don't require root privileges when running the tests 78/3278/2
authorKlement Sekera <[email protected]>
Wed, 5 Oct 2016 12:05:33 +0000 (14:05 +0200)
committerDamjan Marion <[email protected]>
Wed, 5 Oct 2016 16:43:25 +0000 (16:43 +0000)
Change-Id: Ib67bf1a898e3c1e4038698f1cb068ae9099d7921
Signed-off-by: Klement Sekera <[email protected]>
Makefile
test/framework.py

index 912ad1a..3db644e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -189,7 +189,7 @@ build-vpp-api: $(BR)/.bootstrap.ok
        $(call make,$(PLATFORM)_debug,vpp-api-install)
 
 define test
-       @sudo make -C test \
+       @make -C test \
          VPP_TEST_BIN=$(BR)/install-$(1)-native/vpp/bin/vpp \
          VPP_TEST_API_TEST_BIN=$(BR)/install-$(1)-native/vpp-api-test/bin/vpp_api_test \
          V=$(V) TEST=$(TEST)
index 67f8a05..0ee266e 100644 (file)
@@ -241,7 +241,7 @@ class VppTestCase(unittest.TestCase):
     #  @param pkts List variable to store packets to be added to the stream.
     @classmethod
     def pg_add_stream(cls, i, pkts):
-        os.system("sudo rm -f /tmp/pg%u_in.pcap" % i)
+        os.system("rm -f /tmp/pg%u_in.pcap" % i)
         wrpcap("/tmp/pg%u_in.pcap" % i, pkts)
         # no equivalent API command
         cls.cli(0, "packet-generator new pcap /tmp/pg%u_in.pcap source pg%u"
@@ -258,7 +258,7 @@ class VppTestCase(unittest.TestCase):
     @classmethod
     def pg_enable_capture(cls, args):
         for i in args:
-            os.system("sudo rm -f /tmp/pg%u_out.pcap" % i)
+            os.system("rm -f /tmp/pg%u_out.pcap" % i)
             cls.cli(0, "packet-generator capture pg%u pcap /tmp/pg%u_out.pcap"
                     % (i, i))