The informational message for where to find the session logs for failed/errored
tests should be near the test summary message, instead of way up in the beginning. llvm-svn: 117726
This commit is contained in:
parent
2a9177c3de
commit
8ff5d56c20
|
@ -80,6 +80,9 @@ rdir = None
|
||||||
# run. Use '-s session-dir-name' to specify a specific dir name.
|
# run. Use '-s session-dir-name' to specify a specific dir name.
|
||||||
sdir_name = None
|
sdir_name = None
|
||||||
|
|
||||||
|
# Set this flag if there is any session info dumped during the test run.
|
||||||
|
sdir_has_content = False
|
||||||
|
|
||||||
# Default verbosity is 0.
|
# Default verbosity is 0.
|
||||||
verbose = 0
|
verbose = 0
|
||||||
|
|
||||||
|
@ -568,7 +571,6 @@ if not sdir_name:
|
||||||
timestamp = datetime.datetime.now().strftime("%Y-%m-%d-%H_%M_%S")
|
timestamp = datetime.datetime.now().strftime("%Y-%m-%d-%H_%M_%S")
|
||||||
sdir_name = timestamp
|
sdir_name = timestamp
|
||||||
os.environ["LLDB_SESSION_DIRNAME"] = sdir_name
|
os.environ["LLDB_SESSION_DIRNAME"] = sdir_name
|
||||||
sys.stderr.write("\nSession info for test failures/errors will go into directory '%s'\n" % sdir_name)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Invoke the default TextTestRunner to run the test suite, possibly iterating
|
# Invoke the default TextTestRunner to run the test suite, possibly iterating
|
||||||
|
@ -680,12 +682,16 @@ for ia in range(len(archs) if iterArchs else 1):
|
||||||
lldb.test_result = self
|
lldb.test_result = self
|
||||||
|
|
||||||
def addError(self, test, err):
|
def addError(self, test, err):
|
||||||
|
global sdir_has_content
|
||||||
|
sdir_has_content = True
|
||||||
super(LLDBTestResult, self).addError(test, err)
|
super(LLDBTestResult, self).addError(test, err)
|
||||||
method = getattr(test, "markError", None)
|
method = getattr(test, "markError", None)
|
||||||
if method:
|
if method:
|
||||||
method()
|
method()
|
||||||
|
|
||||||
def addFailure(self, test, err):
|
def addFailure(self, test, err):
|
||||||
|
global sdir_has_content
|
||||||
|
sdir_has_content = True
|
||||||
super(LLDBTestResult, self).addFailure(test, err)
|
super(LLDBTestResult, self).addFailure(test, err)
|
||||||
method = getattr(test, "markFailure", None)
|
method = getattr(test, "markFailure", None)
|
||||||
if method:
|
if method:
|
||||||
|
@ -695,6 +701,9 @@ for ia in range(len(archs) if iterArchs else 1):
|
||||||
resultclass=LLDBTestResult).run(suite)
|
resultclass=LLDBTestResult).run(suite)
|
||||||
|
|
||||||
|
|
||||||
|
if sdir_has_content:
|
||||||
|
sys.stderr.write("\nSession logs for test failures/errors can be found in directory '%s'\n" % sdir_name)
|
||||||
|
|
||||||
# Terminate the test suite if ${LLDB_TESTSUITE_FORCE_FINISH} is defined.
|
# Terminate the test suite if ${LLDB_TESTSUITE_FORCE_FINISH} is defined.
|
||||||
# This should not be necessary now.
|
# This should not be necessary now.
|
||||||
if ("LLDB_TESTSUITE_FORCE_FINISH" in os.environ):
|
if ("LLDB_TESTSUITE_FORCE_FINISH" in os.environ):
|
||||||
|
|
Loading…
Reference in New Issue