diff options
-rw-r--r-- | test/framework.py | 6 | ||||
-rw-r--r-- | test/hook.py | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/test/framework.py b/test/framework.py index 8c39701b..ed71908c 100644 --- a/test/framework.py +++ b/test/framework.py @@ -113,8 +113,10 @@ class VppTestCase(unittest.TestCase): cls.set_debug_flags(d) cls.vpp_bin = os.getenv('VPP_TEST_BIN', "vpp") cls.plugin_path = os.getenv('VPP_TEST_PLUGIN_PATH') - cls.vpp_cmdline = [cls.vpp_bin, "unix", "{", "nodaemon", - "cli-listen localhost:5002", "}", + debug_cli = "" + if cls.step or cls.debug_gdb or cls.debug_gdbserver: + debug_cli = "cli-listen localhost:5002" + cls.vpp_cmdline = [cls.vpp_bin, "unix", "{", "nodaemon", debug_cli, "}", "api-segment", "{", "prefix", cls.shm_prefix, "}"] if cls.plugin_path is not None: cls.vpp_cmdline.extend(["plugin_path", cls.plugin_path]) diff --git a/test/hook.py b/test/hook.py index 3ae14737..f81e5187 100644 --- a/test/hook.py +++ b/test/hook.py @@ -73,7 +73,7 @@ class PollHook(Hook): raise Exception("GDB refused to die...") def on_crash(self, core_path): - if self.testcase.interactive: + if self.testcase.debug_core: gdb_path = '/usr/bin/gdb' if os.path.isfile(gdb_path) and os.access(gdb_path, os.X_OK): # automatically attach gdb |