diff options
author | Todd Fiala <todd.fiala@gmail.com> | 2015-12-15 21:33:38 +0000 |
---|---|---|
committer | Todd Fiala <todd.fiala@gmail.com> | 2015-12-15 21:33:38 +0000 |
commit | 6d3de1231517dc20994bee5fc9ad09a2d2752025 (patch) | |
tree | 594abf8a18d6a3c5a3b1dcbf99233c9582f15bdc /lldb/packages/Python/lldbsuite/test/dosep.py | |
parent | 0b17d44faf9bb680a42a22653a9be1ea6c77034b (diff) | |
download | llvm-6d3de1231517dc20994bee5fc9ad09a2d2752025.zip llvm-6d3de1231517dc20994bee5fc9ad09a2d2752025.tar.gz llvm-6d3de1231517dc20994bee5fc9ad09a2d2752025.tar.bz2 |
test-infra: refactored new summary results into base ResultsFormatter class
This allows more specialized formatters to still reuse the results
summarization display from the base class.
llvm-svn: 255676
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dosep.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dosep.py | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dosep.py b/lldb/packages/Python/lldbsuite/test/dosep.py index 7e259bc..ef03d5f 100644 --- a/lldb/packages/Python/lldbsuite/test/dosep.py +++ b/lldb/packages/Python/lldbsuite/test/dosep.py @@ -1632,23 +1632,18 @@ def main(num_threads, test_subdir, test_runner_name, results_formatter): # Only run the old summary logic if we don't have a results formatter # that already prints the summary. - if results_formatter is None or not results_formatter.replaces_summary(): - print_legacy_summary = True - else: - print_legacy_summary = False - + print_legacy_summary = results_formatter is None if not print_legacy_summary: + # Print summary results. Summarized results at the end always + # get printed to stdout, even if --results-file specifies a different + # file for, say, xUnit output. + results_formatter.print_results(sys.stdout) + # Figure out exit code by count of test result types. - issue_count = ( - results_formatter.counts_by_test_result_status( - EventBuilder.STATUS_ERROR) + - results_formatter.counts_by_test_result_status( - EventBuilder.STATUS_FAILURE) + - results_formatter.counts_by_test_result_status( - EventBuilder.STATUS_TIMEOUT) + - results_formatter.counts_by_test_result_status( - EventBuilder.STATUS_EXCEPTIONAL_EXIT) - ) + issue_count = 0 + for issue_status in EventBuilder.TESTRUN_ERROR_STATUS_VALUES: + issue_count += results_formatter.counts_by_test_result_status( + issue_status) # Return with appropriate result code if issue_count > 0: |