tests: add sudo to gdb commands 23/20223/4
authorPaul Vinciguerra <pvinci@vinciconsulting.com>
Wed, 19 Jun 2019 02:59:55 +0000 (22:59 -0400)
committerDamjan Marion <dmarion@me.com>
Thu, 20 Jun 2019 03:37:54 +0000 (03:37 +0000)
Prepend sudo to the gdb command line.

Type: test

Change-Id: I09013c3ca512e26de0c46c02f643b21064ba499c
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
test/framework.py

index fd91d4c..26e93e4 100644 (file)
@@ -351,12 +351,13 @@ class VppTestCase(unittest.TestCase):
         print(single_line_delim)
         print("You can debug the VPP using e.g.:")
         if cls.debug_gdbserver:
-            print("gdb " + cls.vpp_bin + " -ex 'target remote localhost:7777'")
+            print("sudo gdb " + cls.vpp_bin +
+                  " -ex 'target remote localhost:7777'")
             print("Now is the time to attach a gdb by running the above "
                   "command, set up breakpoints etc. and then resume VPP from "
                   "within gdb by issuing the 'continue' command")
         elif cls.debug_gdb:
-            print("gdb " + cls.vpp_bin + " -ex 'attach %s'" % cls.vpp.pid)
+            print("sudo gdb " + cls.vpp_bin + " -ex 'attach %s'" % cls.vpp.pid)
             print("Now is the time to attach a gdb by running the above "
                   "command and set up breakpoints etc.")
         print(single_line_delim)