diff options
author | Todd Fiala <todd.fiala@gmail.com> | 2015-12-07 03:10:02 +0000 |
---|---|---|
committer | Todd Fiala <todd.fiala@gmail.com> | 2015-12-07 03:10:02 +0000 |
commit | 35d604bfdd606c88c1307e9f62ac7de63ed0e73e (patch) | |
tree | 0914e30fb64c9d2b2fb9eda83bf117a3590ba1e0 /lldb/packages/Python/lldbsuite/test | |
parent | 30622bb6a56ae40dd5c912b74ddb88e5cdfd0f5a (diff) | |
download | bcm5719-llvm-35d604bfdd606c88c1307e9f62ac7de63ed0e73e.tar.gz bcm5719-llvm-35d604bfdd606c88c1307e9f62ac7de63ed0e73e.zip |
Move test summary counts to end; simplify issue detail line
Test summary counts now show at the end, with issue details
above.
Issue details now print "ISSUE_TYPE: test method (relative path)".
Relative paths are relative to the
packages/Python/lldbsuite/test directory.
Sample output:
test/dotest.py --executable `pwd`/build/Debug/lldb --results-formatter lldbsuite.test.basic_results_formatter.BasicResultsFormatter --threads 12
Testing: 415 test suites, 12 threads
415 out of 415 test suites processed - TestLldbGdbServer.py
Test Results
Total Test Methods Run (excluding reruns): 2470
Test Method rerun count: 0
Details:
UNEXPECTED SUCCESS: test_symbol_name_dsym (functionalities/completion/TestCompletion.py)
UNEXPECTED SUCCESS: test_symbol_name_dwarf (functionalities/completion/TestCompletion.py)
===================
Test Result Summary
===================
Success: 1329
Expected Failure: 79
Failure: 0
Error: 0
Unexpected Success: 2
Skip: 1060
llvm-svn: 254890
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/basic_results_formatter.py | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/basic_results_formatter.py b/lldb/packages/Python/lldbsuite/test/basic_results_formatter.py index 8571e601710..6c5c70d7f42 100644 --- a/lldb/packages/Python/lldbsuite/test/basic_results_formatter.py +++ b/lldb/packages/Python/lldbsuite/test/basic_results_formatter.py @@ -9,6 +9,11 @@ normal LLDB test run output when no other option is specified. """ from __future__ import print_function +# Python system includes +import os + +# Our imports + from . import test_results @@ -200,14 +205,18 @@ class BasicResultsFormatter(test_results.ResultsFormatter): print_matching_tests = category[2] detail_label = category[3] + test_base_dir = os.path.realpath(os.path.dirname(__file__)) + if print_matching_tests: # Sort by test name for (_, event) in result_events_by_status[result_status_id]: - self.out_file.write("{}: {}.{} ({})\n".format( + test_relative_path = os.path.relpath( + os.path.realpath(event["test_filename"]), + test_base_dir) + self.out_file.write("{}: {} ({})\n".format( detail_label, - event["test_class"], event["test_name"], - event["test_filename"])) + test_relative_path)) def _finish_output_no_lock(self): """Writes the test result report to the output file.""" @@ -236,9 +245,6 @@ class BasicResultsFormatter(test_results.ResultsFormatter): result_events_by_status = self._partition_results_by_status( categories) - # Print the summary - self._print_summary_counts(categories, result_events_by_status) - # Print the details have_details = self._has_printable_details( categories, result_events_by_status) @@ -248,6 +254,10 @@ class BasicResultsFormatter(test_results.ResultsFormatter): self._report_category_details( category, result_events_by_status) + # Print the summary + self._print_summary_counts(categories, result_events_by_status) + + def _finish_output(self): """Prepare and write the results report as all incoming events have arrived. |