Add a TraceOn(self) method to the base test class, which returns True if we are
currently in trace mode (-t to dotest.py), i.e., tracing the lldb command execution. Change TestInferiorCrashing.inferior_crashing_python(self) to check this flag in order to print the stack trace of the inferior thread. llvm-svn: 129785
This commit is contained in:
parent
4a2283a954
commit
f1251cc820
|
@ -70,6 +70,7 @@ class CrashingInferiorTestCase(TestBase):
|
|||
if not thread:
|
||||
self.fail("Fail to stop the thread upon bad access exception")
|
||||
|
||||
if self.TraceOn():
|
||||
lldbutil.PrintStackTrace(thread)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -951,3 +951,7 @@ class TestBase(unittest2.TestCase):
|
|||
return
|
||||
|
||||
print child
|
||||
|
||||
def TraceOn(self):
|
||||
"""Returns True if we are in trace mode (i.e., verbose output)."""
|
||||
return traceAlways
|
||||
|
|
Loading…
Reference in New Issue