summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/basic_results_formatter.py
diff options
context:
space:
mode:
authorTodd Fiala <todd.fiala@gmail.com>2015-12-12 19:26:56 +0000
committerTodd Fiala <todd.fiala@gmail.com>2015-12-12 19:26:56 +0000
commit93153922dbee95254a70d243f8b80191838a4a09 (patch)
treeae0374745e09140512a6ebb452de04379075baed /lldb/packages/Python/lldbsuite/test/basic_results_formatter.py
parente82c58588d4a46e8a5f21c4a3207ffb4ca2a6e9c (diff)
downloadbcm5719-llvm-93153922dbee95254a70d243f8b80191838a4a09.tar.gz
bcm5719-llvm-93153922dbee95254a70d243f8b80191838a4a09.zip
test infra: adds book-keeping for rerunnable tests
Also adds full path info for exceptional exits and timeouts when no test method is currently running. Adds --rerun-all-issues command line arg. If specified, all test issues are eligible for rerun. If not specified, only tests marked flakey are eligible for rerun. The actual rerunning will occur in an upcoming change. This change just handles tha accounting of what should be rerun. llvm-svn: 255438
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/basic_results_formatter.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/basic_results_formatter.py51
1 files changed, 24 insertions, 27 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/basic_results_formatter.py b/lldb/packages/Python/lldbsuite/test/basic_results_formatter.py
index aded67532a3..b2b227ba370 100644
--- a/lldb/packages/Python/lldbsuite/test/basic_results_formatter.py
+++ b/lldb/packages/Python/lldbsuite/test/basic_results_formatter.py
@@ -258,37 +258,34 @@ class BasicResultsFormatter(result_formatter.ResultsFormatter):
if print_matching_tests:
# Sort by test name
for (_, event) in result_events_by_status[result_status_id]:
- extra_info = ""
+ # Convert full test path into test-root-relative.
+ test_relative_path = os.path.relpath(
+ os.path.realpath(event["test_filename"]),
+ lldbsuite.lldb_test_root)
+
+ # Create extra info component (used for exceptional exit info)
if result_status_id == EventBuilder.STATUS_EXCEPTIONAL_EXIT:
- extra_info = "{} ({}) ".format(
+ extra_info = "[EXCEPTIONAL EXIT {} ({})] ".format(
event["exception_code"],
event["exception_description"])
-
- if event["event"] == EventBuilder.TYPE_JOB_RESULT:
- # Jobs status that couldn't be mapped to a test method
- # doesn't have as much detail.
- self.out_file.write(
- "{}: {}{} (no test method running)\n".format(
- detail_label,
- extra_info,
- event["test_filename"]))
else:
- # Figure out the identity we will use for this test.
- if configuration.verbose and ("test_class" in event):
- test_id = "{}.{}".format(
- event["test_class"], event["test_name"])
- else:
- test_id = event["test_name"]
-
- # Test-method events have richer detail, use that here.
- test_relative_path = os.path.relpath(
- os.path.realpath(event["test_filename"]),
- lldbsuite.lldb_test_root)
- self.out_file.write("{}: {}{} ({})\n".format(
- detail_label,
- extra_info,
- test_id,
- test_relative_path))
+ extra_info = ""
+
+ # Figure out the identity we will use for this test.
+ if configuration.verbose and ("test_class" in event):
+ test_id = "{}.{}".format(
+ event["test_class"], event["test_name"])
+ elif "test_name" in event:
+ test_id = event["test_name"]
+ else:
+ test_id = "<no_running_test_method>"
+
+ # Display the info.
+ self.out_file.write("{}: {}{} ({})\n".format(
+ detail_label,
+ extra_info,
+ test_id,
+ test_relative_path))
def _finish_output_no_lock(self):
"""Writes the test result report to the output file."""
OpenPOWER on IntegriCloud