rewrite Python tests as Bash tests

correct University of Arizona copyright statements

refs #4410

Change-Id: I2e34b28698336d39b64030f68984b711f4bdbd0d
diff --git a/test_fib_matching/README.md b/test_fib_matching/README.md
index 25b3ec6..5db5212 100644
--- a/test_fib_matching/README.md
+++ b/test_fib_matching/README.md
@@ -1,35 +1,37 @@
-Test Case - fib-matching
+Test Case - fib_matching
 ========================
 
 ## Objective ##
 
-To test NFD's fib matching on a single host.
+Test NFD's FIB matching mechanism on a single host.
 
 ## Description ##
 
-This test case will run the NFD, ndn-traffic and ndn-traffic-server to test NFD's fib matching. The following steps will be followed:
+This test case will run NFD, ndn-traffic, and ndn-traffic-server to test NFD's FIB matching mechanism.
 
-1. Start NFD.
-2. Start ndn-traffic-server to serve ndn:/ with Content "Z", FreshnessPeriod=10ms.
-3. Start ndn-traffic-server to serve ndn:/A with Content "A", FreshnessPeriod=10ms.
-4. Start ndn-traffic-server to serve ndn:/A/B/C with Content "C", FreshnessPeriod=10ms.
-5. Start ndn-traffic-server to serve ndn:/D/E with Content "E", FreshnessPeriod=10ms.
-6. Invoke ndn-traffic to request ndn:/ MustBeFresh=yes. Fail if unanswered. Fail if Content is not "Z".
-7. Wait 100ms.
-8. Invoke ndn-traffic to request ndn:/F MustBeFresh=yes. Fail if unanswered. Fail if Content is not "Z".
-9. Wait 100ms.
-10. Invoke ndn-traffic to request ndn:/A MustBeFresh=yes. Fail if unanswered. Fail if Content is not "A".
+## Steps ##
+
+1.  Start NFD.
+2.  Start ndn-traffic-server to serve / with Content "Z" with FreshnessPeriod=10ms.
+3.  Start ndn-traffic-server to serve /A with Content "A" with FreshnessPeriod=10ms.
+4.  Start ndn-traffic-server to serve /A/B/C with Content "C" with FreshnessPeriod=10ms.
+5.  Start ndn-traffic-server to serve /D/E with Content "E" with FreshnessPeriod=10ms.
+6.  Invoke ndn-traffic to request / with MustBeFresh=true. Fail if unanswered or if received content is not "Z".
+7.  Wait 100ms.
+8.  Invoke ndn-traffic to request /F with MustBeFresh=true. Fail if unanswered or if received content is not "Z".
+9.  Wait 100ms.
+10. Invoke ndn-traffic to request /A with MustBeFresh=true. Fail if unanswered or if received content is not "A".
 11. Wait 100ms.
-12. Invoke ndn-traffic to request ndn:/a MustBeFresh=yes. Fail if unanswered. Fail if Content is not "Z".
+12. Invoke ndn-traffic to request /a with MustBeFresh=true. Fail if unanswered or if received content is not "Z".
 13. Wait 100ms.
-14. Invoke ndn-traffic to request ndn:/A/B MustBeFresh=yes. Fail if unanswered. Fail if Content is not "A".
+14. Invoke ndn-traffic to request /A/B with MustBeFresh=true. Fail if unanswered or if received content is not "A".
 15. Wait 100ms.
-16. Invoke ndn-traffic to request ndn:/A/B/G MustBeFresh=yes. Fail if unanswered. Fail if Content is not "A".
+16. Invoke ndn-traffic to request /A/B/G with MustBeFresh=true. Fail if unanswered or if received content is not "A".
 17. Wait 100ms.
-18. Invoke ndn-traffic to request ndn:/A/B/C MustBeFresh=yes. Fail if unanswered. Fail if Content is not "C".
+18. Invoke ndn-traffic to request /A/B/C with MustBeFresh=true. Fail if unanswered or if received content is not "C".
 19. Wait 100ms.
-20. Invoke ndn-traffic to request ndn:/A/B/C/P/Q/R/S/T/U/V/W/X/Y/Z MustBeFresh=yes. Fail if unanswered. Fail if Content is not "C".
+20. Invoke ndn-traffic to request /A/B/C/P/Q/R/S/T/U/V/W/X/Y/Z with MustBeFresh=true. Fail if unanswered or if received content is not "C".
 21. Wait 100ms.
-22. Invoke ndn-traffic to request ndn:/D MustBeFresh=yes Exclude=[...,D] (... is a zero-length generic component). Fail if unanswered. Fail if Content is not "Z".
+22. Invoke ndn-traffic to request /D with MustBeFresh=true and Exclude=[...,D] (... is a zero-length generic component). Fail if unanswered or if received content is not "Z".
 23. Wait 100ms.
-24. Invoke ndn-traffic to request ndn:/D MustBeFresh=yes Exclude=[...,E] (... is a zero-length generic component). Fail if unanswered. Fail if Content is not "Z".
+24. Invoke ndn-traffic to request /D with MustBeFresh=true and Exclude=[...,E] (... is a zero-length generic component). Fail if unanswered or if received content is not "Z".
diff --git a/test_fib_matching/fib-matching-test.sh b/test_fib_matching/fib-matching-test.sh
new file mode 100755
index 0000000..eb0dc9e
--- /dev/null
+++ b/test_fib_matching/fib-matching-test.sh
@@ -0,0 +1,169 @@
+#!/bin/bash
+source ../multi-host.conf
+
+clean_up() {
+  r=$(sudo killall ndn-traffic-server 2>&1)
+  r=$(sudo killall ndn-traffic 2>&1)
+  r=$(sudo killall nfd 2>&1)
+}
+
+# A: Start NFD
+workdir=$(pwd)
+echo "Starting nfd on A..."
+mkdir -p $workdir/logs; sudo nfd &> $workdir/logs/nfd.log &
+sleep 1
+
+# A: Start instances of ndn-traffic-server
+echo "Starting Traffic Server 1 (Prefix=/, FreshnessPeriod=10ms, Data=Z)..."
+ndn-traffic-server $workdir/test-traffic-server-1.conf &> $workdir/logs/server-1.log &
+sleep 0.1
+echo "Starting Traffic Server 2 (Prefix=/A, FreshnessPeriod=10ms, Data=A)..."
+ndn-traffic-server $workdir/test-traffic-server-2.conf &> $workdir/logs/server-2.log &
+sleep 0.1
+echo "Starting Traffic Server 3 (Prefix=/A/B/C, FreshnessPeriod=10ms, Data=C)..."
+ndn-traffic-server $workdir/test-traffic-server-3.conf &> $workdir/logs/server-3.log &
+sleep 0.1
+echo "Starting Traffic Server 4 (Prefix=/D/E, FreshnessPeriod=10ms, Data=E)..."
+ndn-traffic-server $workdir/test-traffic-server-4.conf &> $workdir/logs/server-4.log &
+sleep 0.1
+
+# A: Request / with MustBeFresh=true. Fail if unanswered or if received content is not "Z".
+echo "Starting Traffic Client 1 (Prefix=/, MustBeFresh=true, ExpectedContent=Z, MaxSuffixComponents=2)..."
+ndn-traffic -c 1 $workdir/test-traffic-client-1.conf &> $workdir/logs/client-1.log
+outcode=$?
+if [[ $outcode -ne 0 ]]; then
+  echo "Received non-zero exit code from Traffic Client 1. Actual: $outcode"
+  clean_up
+  exit 1
+fi
+echo "Traffic Client 1 received Data with Content=Z"
+
+# Sleep for 100ms
+sleep 0.1
+
+# A: Request /F with MustBeFresh=true. Fail if unanswered or if received content is not "Z".
+echo "Starting Traffic Client 2 (Prefix=/F, MustBeFresh=true, ExpectedContent=Z)..."
+ndn-traffic -c 1 $workdir/test-traffic-client-2.conf &> $workdir/logs/client-2.log
+outcode=$?
+if [[ $outcode -ne 0 ]]; then
+  echo "Received non-zero exit code from Traffic Client 2. Actual: $outcode"
+  clean_up
+  exit 1
+fi
+echo "Traffic Client 2 received Data with Content=Z"
+
+# Sleep for 100ms
+sleep 0.1
+
+# A: Request /A with MustBeFresh=true. Fail if unanswered or if received content is not "A"
+echo "Starting Traffic Client 3 (Prefix=/A, MustBeFresh=true, ExpectedContent=A)..."
+ndn-traffic -c 1 $workdir/test-traffic-client-3.conf &> $workdir/logs/client-3.log
+outcode=$?
+if [[ $outcode -ne 0 ]]; then
+  echo "Received non-zero exit code from Traffic Client 3. Actual: $outcode"
+  clean_up
+  exit 1
+fi
+echo "Traffic Client 3 received Data with Content=A"
+
+# Sleep for 100ms
+sleep 0.1
+
+# A: Request /a with MustBeFresh=true. Fail if unanswered or if received content is not "Z".
+echo "Starting Traffic Client 4 (Prefix=/a, MustBeFresh=true, ExpectedContent=Z)..."
+ndn-traffic -c 1 $workdir/test-traffic-client-4.conf &> $workdir/logs/client-4.log
+outcode=$?
+if [[ $outcode -ne 0 ]]; then
+  echo "Received non-zero exit code from Traffic Client 4. Actual: $outcode"
+  clean_up
+  exit 1
+fi
+echo "Traffic Client 4 received Data with Content=Z"
+
+# Sleep for 100ms
+sleep 0.1
+
+# A: Request /A/B with MustBeFresh=true. Fail if unanswered or if received content is not "A".
+echo "Starting Traffic Client 5 (Prefix=/A/B, MustBeFresh=true, ExpectedContent=A)..."
+ndn-traffic -c 1 $workdir/test-traffic-client-5.conf &> $workdir/logs/client-5.log
+outcode=$?
+if [[ $outcode -ne 0 ]]; then
+  echo "Received non-zero exit code from Traffic Client 5. Actual: $outcode"
+  clean_up
+  exit 1
+fi
+echo "Traffic Client 5 received Data with Content=A"
+
+# Sleep for 100ms
+sleep 0.1
+
+# A: Request /A/B/G with MustBeFresh=true. Fail if unanswered or if received content is not "A".
+echo "Starting Traffic Client 6 (Prefix=/A/B/G, MustBeFresh=true, ExpectedContent=A)..."
+ndn-traffic -c 1 $workdir/test-traffic-client-6.conf &> $workdir/logs/client-6.log
+outcode=$?
+if [[ $outcode -ne 0 ]]; then
+  echo "Received non-zero exit code from Traffic Client 6. Actual: $outcode"
+  clean_up
+  exit 1
+fi
+echo "Traffic Client 6 received Data with Content=A"
+
+# Sleep for 100ms
+sleep 0.1
+
+# A: Request /A/B/C with MustBeFresh=true. Fail if unanswered or if received content is not "C".
+echo "Starting Traffic Client 7 (Prefix=/A/B/C, MustBeFresh=true, ExpectedContent=C)..."
+ndn-traffic -c 1 $workdir/test-traffic-client-7.conf &> $workdir/logs/client-7.log
+outcode=$?
+if [[ $outcode -ne 0 ]]; then
+  echo "Received non-zero exit code from Traffic Client 7. Actual: $outcode"
+  clean_up
+  exit 1
+fi
+echo "Traffic Client 7 received Data with Content=C"
+
+# Sleep for 100ms
+sleep 0.1
+
+# A: Request /A/B/C/P/Q/R/S/T/U/V/W/X/Y/Z with MustBeFresh=true. Fail if unanswered or if received
+# content is not "C".
+echo "Starting Traffic Client 8 (Prefix=/A/B/C/P/Q/R/S/T/U/V/W/X/Y/Z, MustBeFresh=true, ExpectedContent=C)..."
+ndn-traffic -c 1 $workdir/test-traffic-client-8.conf &> $workdir/logs/client-8.log
+outcode=$?
+if [[ $outcode -ne 0 ]]; then
+  echo "Received non-zero exit code from Traffic Client 8. Actual: $outcode"
+  clean_up
+  exit 1
+fi
+echo "Traffic Client 8 received Data with Content=C"
+
+# Sleep for 100ms
+sleep 0.1
+
+# A: Request /D with MustBeFresh=true and Exclude=[...,D]. Fail if unanswered or if received content
+# is not "Z".
+echo "Starting Traffic Client 9 (Prefix=/D, MustBeFresh=true, ExcludeRange=...,D, ExpectedContent=Z)..."
+ndn-traffic -c 1 $workdir/test-traffic-client-9.conf &> $workdir/logs/client-9.log
+outcode=$?
+if [[ $outcode -ne 0 ]]; then
+  echo "Received non-zero exit code from Traffic Client 9. Actual: $outcode"
+  clean_up
+  exit 1
+fi
+echo "Traffic Client 9 received Data with Content=Z"
+
+# Sleep for 100ms
+sleep 0.1
+
+# A: Request /D with MustBeFresh=true and Exclude=[...,E]. Fail if unanswered or if received content
+# is not "Z".
+echo "Starting Traffic Client 10 (Prefix=/D MustBeFresh=true, ExcludeRange=...,E, ExpectedContent=Z)..."
+outcode=$?
+if [[ $outcode -ne 0 ]]; then
+  echo "Received non-zero exit code from Traffic Client 10. Actual: $outcode"
+  clean_up
+  exit 1
+fi
+echo "Traffic Client 10 received Data with Content=Z"
+
+clean_up
diff --git a/test_fib_matching/test_fib_matching.py b/test_fib_matching/test_fib_matching.py
index 55c4788..afa23ed 100644
--- a/test_fib_matching/test_fib_matching.py
+++ b/test_fib_matching/test_fib_matching.py
@@ -1,240 +1,33 @@
 #!/usr/bin/python2
 # -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 #
-# Copyright (C) 2014 University of Arizona
+# Copyright (C) 2014-2018 Arizona Board of Regents.
 # Author: Jerald Paul Abraham <jeraldabraham@email.arizona.edu>
+# Author: Eric Newberry <enewberry@cs.arizona.edu>
 # See COPYING for copyright and distribution information.
 #
 
 import os
-import time
 import unittest
-import process_manager
+import subprocess
 
-class test_fib_matching(unittest.TestCase, process_manager.ProcessManager):
-    """Test case for testing fib matching"""
+class test_fib_matching(unittest.TestCase):
+    """Test case for testing FIB matching"""
 
     def setUp(self):
         print "\nTesting FIB Matching"
         print "********************"
+        os.chdir("test_fib_matching")
 
     def tearDown(self):
-        self.killNfd()
-        try:
-            self.killProcess("ndn-traffic-server-1")
-            self.killProcess("ndn-traffic-server-2")
-            self.killProcess("ndn-traffic-server-3")
-            self.killProcess("ndn-traffic-server-4")
-            self.killProcess("ndn-traffic-client-1")
-            self.killProcess("ndn-traffic-client-2")
-            self.killProcess("ndn-traffic-client-3")
-            self.killProcess("ndn-traffic-client-4")
-            self.killProcess("ndn-traffic-client-5")
-            self.killProcess("ndn-traffic-client-6")
-            self.killProcess("ndn-traffic-client-7")
-            self.killProcess("ndn-traffic-client-8")
-            self.killProcess("ndn-traffic-client-9")
-            self.killProcess("ndn-traffic-client-10")
-            self.cleanupProcesses()
-        except IOError as e:
-            self.cleanupProcesses()
-            pass
+        print "********************"
+        os.chdir("..")
 
-    def checkAndReportFailure(self, processKey, processName):
-        if self.hasProcessCompleted(processKey):
-            if self.getProcessReturnCode(processKey) != 0:
-                print self.getProcessOutput(processKey)
-                print self.getProcessError(processKey)
-                self.fail(">> TEST FAILED - received non-zero return code from " + processName)
-        else:
-            self.fail(">> TEST FAILED - " + processName + " failed to complete")
-
-    def test_matching(self):
-
-        #Start NFD
-        self.startNfd()
-        time.sleep(1)
-
-        #Start ndn-traffic-server to serve ndn:/ with Content "Z", FreshnessPeriod=10ms
-        #Prefix registration using NFD FibMgmt
-        serverConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-server-1.conf")
-        self.startProcess("ndn-traffic-server-1",
-            ["ndn-traffic-server", serverConfigurationFile],
-            "-> Starting Traffic Server 1 (Prefix=ndn:/, FreshnessPeriod=10ms, Data=Z)")
-        time.sleep(0.1)
-
-        #Start ndn-traffic-server to serve ndn:/A with Content "A", FreshnessPeriod=10ms
-        #Prefix registration using NFD FibMgmt
-        serverConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-server-2.conf")
-        self.startProcess("ndn-traffic-server-2",
-            ["ndn-traffic-server", serverConfigurationFile],
-            "-> Starting Traffic Server 2 (Prefix=ndn:/A, FreshnessPeriod=10ms, Data=A)")
-        time.sleep(0.1)
-
-        #Start ndn-traffic-server to serve ndn:/A/B/C with Content "C", FreshnessPeriod=10ms
-        #Prefix registration using NFD FibMgmt
-        serverConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-server-3.conf")
-        self.startProcess("ndn-traffic-server-3",
-            ["ndn-traffic-server", serverConfigurationFile],
-            "-> Starting Traffic Server 3 (Prefix=ndn:/A/B/C, FreshnessPeriod=10ms, Data=C)")
-        time.sleep(0.1)
-
-        #Start ndn-traffic-server to serve ndn:/D/E with Content "E", FreshnessPeriod=10ms
-        #Prefix registration using NFD FibMgmt
-        serverConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-server-4.conf")
-        self.startProcess("ndn-traffic-server-4",
-            ["ndn-traffic-server", serverConfigurationFile],
-            "-> Starting Traffic Server 4 (Prefix=ndn:/D/E, FreshnessPeriod=10ms, Data=E)")
-        time.sleep(0.1)
-
-        #Invoke ndn-traffic to request ndn:/ MustBeFresh=yes
-        #Fail if unanswered. Fail if Content is not "Z".
-        clientConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-client-1.conf")
-        self.startProcess("ndn-traffic-client-1",
-            ["ndn-traffic", "-c 1", clientConfigurationFile],
-            ("-> Starting Traffic Client 1 (Prefix=ndn:/, MustBeFresh=Yes,"
-             " ExpectedContent=Z, MaxSuffixComponents=2)"))
-        self.waitForProcessCompletion("ndn-traffic-client-1", 10)
-        self.checkAndReportFailure("ndn-traffic-client-1", "Traffic Client 1")
-        print "-> Traffic Client 1 received data with Content=Z"
-
-        #Wait 100ms
-        time.sleep(0.1)
-
-        #Invoke ndn-traffic to request ndn:/F MustBeFresh=yes
-        #Fail if unanswered. Fail if Content is not "Z".
-        clientConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-client-2.conf")
-        self.startProcess("ndn-traffic-client-2",
-            ["ndn-traffic", "-c 1", clientConfigurationFile],
-            "-> Starting Traffic Client 2 (Prefix=ndn:/F, MustBeFresh=Yes, ExpectedContent=Z)")
-        self.waitForProcessCompletion("ndn-traffic-client-2", 10)
-        self.checkAndReportFailure("ndn-traffic-client-2", "Traffic Client 2")
-        print "-> Traffic Client 2 received data with Content=Z"
-
-        #Wait 100ms
-        time.sleep(0.1)
-
-        #Invoke ndn-traffic to request ndn:/A MustBeFresh=yes
-        #Fail if unanswered. Fail if Content is not "A".
-        clientConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-client-3.conf")
-        self.startProcess("ndn-traffic-client-3",
-            ["ndn-traffic", "-c 1", clientConfigurationFile],
-            "-> Starting Traffic Client 3 (Prefix=ndn:/A, MustBeFresh=Yes, ExpectedContent=A)")
-        self.waitForProcessCompletion("ndn-traffic-client-3", 10)
-        self.checkAndReportFailure("ndn-traffic-client-3", "Traffic Client 3")
-        print "-> Traffic Client 3 received data with Content=A"
-
-        #Wait 100ms
-        time.sleep(0.1)
-
-        #Invoke ndn-traffic to request ndn:/a MustBeFresh=yes
-        #Fail if unanswered. Fail if Content is not "Z".
-        clientConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-client-4.conf")
-        self.startProcess("ndn-traffic-client-4",
-            ["ndn-traffic", "-c 1", clientConfigurationFile],
-            "-> Starting Traffic Client 4 (Prefix=ndn:/a, MustBeFresh=Yes, ExpectedContent=Z)")
-        self.waitForProcessCompletion("ndn-traffic-client-4", 10)
-        self.checkAndReportFailure("ndn-traffic-client-4", "Traffic Client 4")
-        print "-> Traffic Client 4 received data with Content=Z"
-
-        #Wait 100ms
-        time.sleep(0.1)
-
-        #Invoke ndn-traffic to request ndn:/A/B MustBeFresh=yes
-        #Fail if unanswered. Fail if Content is not "A".
-        clientConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-client-5.conf")
-        self.startProcess("ndn-traffic-client-5",
-            ["ndn-traffic", "-c 1", clientConfigurationFile],
-            "-> Starting Traffic Client 5 (Prefix=ndn:/A/B, MustBeFresh=Yes, ExpectedContent=A)")
-        self.waitForProcessCompletion("ndn-traffic-client-5", 10)
-        self.checkAndReportFailure("ndn-traffic-client-5", "Traffic Client 5")
-        print "-> Traffic Client 5 received data with Content=A"
-
-        #Wait 100ms
-        time.sleep(0.1)
-
-        #Invoke ndn-traffic to request ndn:/A/B/G MustBeFresh=yes
-        #Fail if unanswered. Fail if Content is not "A".
-        clientConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-client-6.conf")
-        self.startProcess("ndn-traffic-client-6",
-            ["ndn-traffic", "-c 1", clientConfigurationFile],
-            "-> Starting Traffic Client 6 (Prefix=ndn:/A/B/G, MustBeFresh=Yes, ExpectedContent=A)")
-        self.waitForProcessCompletion("ndn-traffic-client-6", 10)
-        self.checkAndReportFailure("ndn-traffic-client-6", "Traffic Client 6")
-        print "-> Traffic Client 6 received data with Content=A"
-
-        #Wait 100ms
-        time.sleep(0.1)
-
-        #Invoke ndn-traffic to request ndn:/A/B/C MustBeFresh=yes
-        #Fail if unanswered. Fail if Content is not "C".
-        clientConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-client-7.conf")
-        self.startProcess("ndn-traffic-client-7",
-            ["ndn-traffic", "-c 1", clientConfigurationFile],
-            "-> Starting Traffic Client 7 (Prefix=ndn:/A/B/C, MustBeFresh=Yes, ExpectedContent=C)")
-        self.waitForProcessCompletion("ndn-traffic-client-7", 10)
-        self.checkAndReportFailure("ndn-traffic-client-7", "Traffic Client 7")
-        print "-> Traffic Client 7 received data with Content=C"
-
-        #Wait 100ms
-        time.sleep(0.1)
-
-        #Invoke ndn-traffic to request ndn:/A/B/C/P/Q/R/S/T/U/V/W/X/Y/Z MustBeFresh=yes
-        #Fail if unanswered. Fail if Content is not "C".
-        clientConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-client-8.conf")
-        self.startProcess("ndn-traffic-client-8",
-            ["ndn-traffic", "-c 1", clientConfigurationFile],
-            ("-> Starting Traffic Client 8 (Prefix=ndn:/A/B/C/P/Q/R/S/T/U/V/W/X/Y/Z,"
-             " MustBeFresh=Yes, ExpectedContent=C)"))
-        self.waitForProcessCompletion("ndn-traffic-client-8", 10)
-        self.checkAndReportFailure("ndn-traffic-client-8", "Traffic Client 8")
-        print "-> Traffic Client 8 received data with Content=C"
-
-        #Wait 100ms
-        time.sleep(0.1)
-
-        #Invoke ndn-traffic to request ndn:/D MustBeFresh=yes Exclude=[...,D]
-        #Fail if unanswered. Fail if Content is not "Z".
-        clientConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-client-9.conf")
-        self.startProcess("ndn-traffic-client-9",
-            ["ndn-traffic", "-c 1", clientConfigurationFile],
-            ("-> Starting Traffic Client 9 (Prefix=ndn:/D, MustBeFresh=Yes,"
-             " ExcludeRange=...,D, ExpectedContent=Z)"))
-        self.waitForProcessCompletion("ndn-traffic-client-9", 10)
-        self.checkAndReportFailure("ndn-traffic-client-9", "Traffic Client 9")
-        print "-> Traffic Client 9 received data with Content=Z"
-
-        #Wait 100ms
-        time.sleep(0.1)
-
-        #Invoke ndn-traffic to request ndn:/D MustBeFresh=yes Exclude=[...,E]
-        #Fail if unanswered. Fail if Content is not "Z".
-        clientConfigurationFile = os.path.abspath(
-            "test_fib_matching/test-traffic-client-10.conf")
-        self.startProcess("ndn-traffic-client-10",
-            ["ndn-traffic", "-c 1", clientConfigurationFile],
-            ("-> Starting Traffic Client 10 (Prefix=ndn:/E, MustBeFresh=Yes,"
-             " ExcludeRange=...,E, ExpectedContent=Z)"))
-        self.waitForProcessCompletion("ndn-traffic-client-10", 10)
-        self.checkAndReportFailure("ndn-traffic-client-10", "Traffic Client 10")
-        print "-> Traffic Client 10 received data with Content=Z"
-
-        #Stop all four traffic servers
-        self.killProcess("ndn-traffic-server-1")
-        self.killProcess("ndn-traffic-server-2")
-        self.killProcess("ndn-traffic-server-3")
-        self.killProcess("ndn-traffic-server-4")
-        print ">> TEST SUCCESSFUL"
+    def test_fib_matching(self):
+        ret = subprocess.call(["./fib-matching-test.sh"], shell=True)
+        print "Test script return value:", ret
+        errormsg = {
+            1 : "Traffic Client did not receive a Data or received Data did not contain expected content",
+        }
+        if (ret != 0):
+            self.fail(errormsg[ret])