diff options
author | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-12-19 16:09:43 -0500 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-12-20 04:09:09 +0000 |
commit | c701e5718201fbfb205998343da70c816c57795f (patch) | |
tree | ac63febf19925f5bc38b673dfc1f513d3076be23 /test/framework.py | |
parent | ff6cdcca2dc741bb3b0d3757e83ada523c7a4a45 (diff) |
tests: don't prompt to launch gdb for sanity test case
Type: test
Change-Id: I4c54121b76b341381a819cee928c3c2455a83503
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r-- | test/framework.py | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/test/framework.py b/test/framework.py index 39fd37f4c73..7ff7978a055 100644 --- a/test/framework.py +++ b/test/framework.py @@ -574,19 +574,27 @@ class VppTestCase(unittest.TestCase): raise @classmethod + def _debug_quit(cls): + if (cls.debug_gdbserver or cls.debug_gdb): + try: + cls.vpp.poll() + + if cls.vpp.returncode is None: + print() + print(double_line_delim) + print("VPP or GDB server is still running") + print(single_line_delim) + input("When done debugging, press ENTER to kill the " + "process and finish running the testcase...") + except AttributeError: + pass + + @classmethod def quit(cls): """ Disconnect vpp-api, kill vpp and cleanup shared memory files """ - if (cls.debug_gdbserver or cls.debug_gdb) and hasattr(cls, 'vpp'): - cls.vpp.poll() - if cls.vpp.returncode is None: - print() - print(double_line_delim) - print("VPP or GDB server is still running") - print(single_line_delim) - input("When done debugging, press ENTER to kill the " - "process and finish running the testcase...") + cls._debug_quit() # first signal that we want to stop the pump thread, then wake it up if hasattr(cls, 'pump_thread_stop_flag'): @@ -597,7 +605,7 @@ class VppTestCase(unittest.TestCase): cls.logger.debug("Waiting for pump thread to stop") cls.pump_thread.join() if hasattr(cls, 'vpp_stderr_reader_thread'): - cls.logger.debug("Waiting for stdderr pump to stop") + cls.logger.debug("Waiting for stderr pump to stop") cls.vpp_stderr_reader_thread.join() if hasattr(cls, 'vpp'): |