diff options
| author | Philip Salzmann | 2022-10-24 14:17:15 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-10-25 20:02:26 +0200 |
| commit | 6185d0cc0a737d5a009f626d3611b868512d12f7 (patch) | |
| tree | 6f190d9cbd5c667cb68282e263e77e67706e76f9 /tests/TestScripts | |
| parent | 8ce92d2c7288b6b3261caf1c016f8a779b6a8efc (diff) | |
| download | catch3-6185d0cc0a737d5a009f626d3611b868512d12f7.tar.gz | |
Use console reporter's totals summary for compact reporter
This changes the compact reporter's summary of test run totals to use
the same format as the console reporter. This means that while output is
no longer on a single line (two instead), it now includes totals for
`failedButOk` test cases and assertions, which were previously missing.
Diffstat (limited to 'tests/TestScripts')
| -rw-r--r-- | tests/TestScripts/testConfigureDefaultReporter.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/TestScripts/testConfigureDefaultReporter.py b/tests/TestScripts/testConfigureDefaultReporter.py index 66c88da0..b10bd528 100644 --- a/tests/TestScripts/testConfigureDefaultReporter.py +++ b/tests/TestScripts/testConfigureDefaultReporter.py @@ -30,15 +30,12 @@ build_dir_path = os.path.join(os.path.abspath(sys.argv[2]), 'CMakeConfigTests', configure_and_build(catch2_source_path, build_dir_path, - [("CATCH_CONFIG_DEFAULT_REPORTER", "compact")]) + [("CATCH_CONFIG_DEFAULT_REPORTER", "xml")]) stdout, _ = run_and_return_output(os.path.join(build_dir_path, 'tests'), 'SelfTest', ['[approx][custom]']) - -# This matches the summary line made by compact reporter, console reporter's -# summary line does not match the regex. -summary_regex = 'Passed \d+ test case with \d+ assertions.' -if not re.search(summary_regex, stdout): - print("Could not find '{}' in the stdout".format(summary_regex)) +xml_tag = '</Catch2TestRun>' +if xml_tag not in stdout: + print("Could not find '{}' in the stdout".format(xml_tag)) print('stdout: "{}"'.format(stdout)) exit(2) |