Improve debug-cli in test framework

Opening debug-cli only makes sense if there is time for user to use it,
so either the run must be debugged or stepped. Only open the debug-cli
in these cases.

Change-Id: Ied276071797a549880d730cda43c59230a412efe
Signed-off-by: Klement Sekera <ksekera@cisco.com>
This commit is contained in:
Klement Sekera
2016-11-02 09:25:05 +01:00
committed by Damjan Marion
parent 446e1f577b
commit 01bbbe91fa
2 changed files with 5 additions and 3 deletions

View File

@ -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