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:
Johnny Chen 2011-04-19 19:04:38 +00:00
parent 4a2283a954
commit f1251cc820
2 changed files with 6 additions and 1 deletions

View File

@ -70,7 +70,8 @@ class CrashingInferiorTestCase(TestBase):
if not thread:
self.fail("Fail to stop the thread upon bad access exception")
lldbutil.PrintStackTrace(thread)
if self.TraceOn():
lldbutil.PrintStackTrace(thread)
if __name__ == '__main__':
import atexit

View File

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