ping: install ndnping from ndn-tools

refs #2836

Change-Id: I650680a388801fec6a11ec55a5d6d2d13da2f737
diff --git a/README.md b/README.md
index 0e81f58..92c7c57 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@
       setup_security     - create an identity (/tmp/nfd_integration) using ndnsec
       install_NFD        - install NFD (https://github.com/named-data/NFD)
       install_ndntraffic - install ndn-traffic-generator (https://github.com/named-data/ndn-traffic-generator)
-      install_ndntlvping - install ndn-tlv-ping (https://github.com/named-data/ndn-tlv-ping)
+      install_ndntools   - install ndn-tools (https://github.com/named-data/ndn-tools)
       install_all        - do all of the above
       help               - print this message and exit
 
@@ -40,7 +40,7 @@
       The test case(s) to be executed should be provided as command line option(s)
 
     OPTIONS:
-      test_ndntlvping
+      test_ndnping
       test_all           - run all the above tests
       help               - print this message and exit
 
diff --git a/install_apps.py b/install_apps.py
index 1af7a8b..523a1a7 100755
--- a/install_apps.py
+++ b/install_apps.py
@@ -15,7 +15,7 @@
     print "  setup_security     - create an identity using ndnsec (/tmp/nfd_integration)"
     print "  install_NFD        - install NFD (named-data/NFD)"
     print "  install_ndntraffic - install ndn-traffic-generator (named-data/ndn-traffic-generator)"
-    print "  install_ndntlvping - install ndn-tlv-ping (named-data/ndn-tlv-ping)"
+    print "  install_ndntools   - install ndn-tools (named-data/ndn-tools)"
     print "  install_all        - do all of the above"
     print "  help               - print this message and exit\n"
 
@@ -30,7 +30,7 @@
                      "setup_security",
                      "install_NFD",
                      "install_ndntraffic",
-                     "install_ndntlvping",
+                     "install_ndntools",
                      "install_all",
                      "help" ]
 
@@ -48,7 +48,7 @@
                 actionList.add("setup_security")
                 actionList.add("install_NFD")
                 actionList.add("install_ndntraffic")
-                actionList.add("install_ndntlvping")
+                actionList.add("install_ndntools")
             module = __import__("setup_preparation_folder")
             module.run()
             module = __import__("install_dependencies")
@@ -65,8 +65,8 @@
             if "install_ndntraffic" in actionList:
                 module = __import__("install_ndntraffic")
                 module.run()
-            if "install_ndntlvping" in actionList:
-                module = __import__("install_ndntlvping")
+            if "install_ndntools" in actionList:
+                module = __import__("install_ndntools")
                 module.run()
             print ""
         else:
diff --git a/install_helpers/install_ndntlvping.py b/install_helpers/install_ndntlvping.py
deleted file mode 100644
index c27f254..0000000
--- a/install_helpers/install_ndntlvping.py
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/python2
-import os
-
-# Install ndn-tlv-ping
-def run():
-    print "\nINSTALLING ndn-tlv-ping"
-    print "***********************"
-    os.system("git clone https://github.com/named-data/ndn-tlv-ping --depth 1")
-    os.chdir("ndn-tlv-ping")
-    os.system("./waf distclean")
-    os.system("./waf configure")
-    os.system("./waf -j1")
-    os.system("sudo ./waf install")
-    os.chdir("..")
diff --git a/install_helpers/install_ndntools.py b/install_helpers/install_ndntools.py
new file mode 100644
index 0000000..cf49556
--- /dev/null
+++ b/install_helpers/install_ndntools.py
@@ -0,0 +1,14 @@
+#!/usr/bin/python2
+import os
+
+# Install ndn-tools
+def run():
+    print "\nINSTALLING ndn-tools"
+    print "***********************"
+    os.system("git clone https://github.com/named-data/ndn-tools --depth 1")
+    os.chdir("ndn-tools")
+    os.system("./waf distclean")
+    os.system("./waf configure")
+    os.system("./waf -j1")
+    os.system("sudo ./waf install")
+    os.chdir("..")
diff --git a/test_linkfail/ping.sh b/test_linkfail/ping.sh
index 6b741eb..99954f3 100755
--- a/test_linkfail/ping.sh
+++ b/test_linkfail/ping.sh
@@ -6,8 +6,8 @@
 
 ndnping -c 25 /B &> logs/${LOGPREFIX}_ping_A.log
 
-LOSS=$(sed -n 's/.*Packet Loss=\([^,]*\).*/\1/p' logs/${LOGPREFIX}_ping_A.log)
-MAXRTT=$(sed -n 's/Round Trip Time.* = (\([^)]*\).*/\1/p' logs/${LOGPREFIX}_ping_A.log | cut -d/ -f2)
+LOSS=$(sed -n 's/.*received, \([^,]*\) packet loss.*/\1/p' logs/${LOGPREFIX}_ping_A.log)
+MAXRTT=$(sed -n 's/rtt.* = .*\/\([^)]*\).*\/.*/\1/p' logs/${LOGPREFIX}_ping_A.log)
 
 [[ $LOSS == '0%' ]] && [[ $(echo $MAXRTT | sed 's/\..*//') -le 100 ]]
 
diff --git a/test_ndntlvping/README.md b/test_ndnping/README.md
similarity index 72%
rename from test_ndntlvping/README.md
rename to test_ndnping/README.md
index 7cbe8a4..46a5ebb 100644
--- a/test_ndntlvping/README.md
+++ b/test_ndnping/README.md
@@ -1,9 +1,9 @@
-Test Case - ndnlvping
-=====================
+Test Case - ndnping
+===================
 
 ## Objective ##
 
-To test the ndn-tlv-ping application on a single host.
+To test the ndnping application on a single host.
 
 ## Description ##
 
diff --git a/test_ndntlvping/__init__.py b/test_ndnping/__init__.py
similarity index 100%
rename from test_ndntlvping/__init__.py
rename to test_ndnping/__init__.py
diff --git a/test_ndntlvping/test_ndntlvping.py b/test_ndnping/test_ndnping.py
similarity index 82%
rename from test_ndntlvping/test_ndntlvping.py
rename to test_ndnping/test_ndnping.py
index cafae09..131b71f 100644
--- a/test_ndntlvping/test_ndntlvping.py
+++ b/test_ndnping/test_ndnping.py
@@ -10,11 +10,11 @@
 import unittest
 import process_manager
 
-class test_ndntlvping(unittest.TestCase, process_manager.ProcessManager):
-    """Test case for testing ndn-tlv-ping application"""
+class test_ndnping(unittest.TestCase, process_manager.ProcessManager):
+    """Test case for testing ndnping application"""
 
     def setUp(self):
-        print "\nTesting ndn-tlv-ping"
+        print "\nTesting ndnping"
         print "********************"
 
     def tearDown(self):
@@ -29,10 +29,10 @@
         self.startNrd()
         time.sleep(1)
         self.startProcess("ndnpingserver",
-            ["ndnpingserver", "-p 1", "/test/ndntlvping"], "-> Starting Ping Server")
+            ["ndnpingserver", "-p1", "/test/ndnping"], "-> Starting Ping Server")
         time.sleep(1)
         self.startProcess("ndnping",
-            ["ndnping", "-c 1", "/test/ndntlvping"], "-> Starting Ping Client")
+            ["ndnping", "-c1", "/test/ndnping"], "-> Starting Ping Client")
         time.sleep(1)
         self.waitForProcessCompletion("ndnping", 10)
         self.waitForProcessCompletion("ndnpingserver", 10)
diff --git a/test_nfdc/README.md b/test_nfdc/README.md
index 25f3d89..c297597 100644
--- a/test_nfdc/README.md
+++ b/test_nfdc/README.md
@@ -38,7 +38,7 @@
 13. Invoke nfdc to add a nexthop for ndn:/test-nfdc with cost 16 toward FaceId created in step 9.
 14. Execute nfd-status. Check the existence of ndn:/test-nfdc FIB entry, and the correctness of cost on nexthop records.
 15. Invoke nfdc to choose BroadcastStrategy for ndn:/ namespace.
-16. Invoke ndn-tlv-ping to send 100 Interests under ndn:/test-nfdc prefix.
+16. Invoke ndnping to send 100 Interests under ndn:/test-nfdc prefix.
 17. Pause 50ms before sending each Interest.
 18. Execute nfd-status. Verify NOutInterests counters of faces created in step 3,5,7,9 are greater than 60.
 19. On host B, execute nfd-status. Check the existence of tcp4, tcp6, udp4, udp6 faces with host A's address. Verify NInInterests counters for those faces are greater than 60.
diff --git a/test_nfdc/nfdc-test.sh b/test_nfdc/nfdc-test.sh
index 9c49198..862115c 100755
--- a/test_nfdc/nfdc-test.sh
+++ b/test_nfdc/nfdc-test.sh
@@ -89,7 +89,7 @@
   # Invoke nfdc to choose BroadcastStrategy for ndn:/ namespace.
   nfdc set-strategy ndn:/ ndn:/localhost/nfd/strategy/broadcast
 
-  ndnping ndn:/test-nfdc -c $NUM_OF_PINGS
+  ndnping -c $NUM_OF_PINGS ndn:/test-nfdc
 
   check_nfd_status_counters $faceIdTcp4 tcp4://$IP4_B1 out $NUM_OF_PINGS
   check_nfd_status_counters $faceIdTcp6 tcp6://[$IP6_B1] out $NUM_OF_PINGS