JSONReporter considers verbosity when listing tests
* Quiet verbosity provides just the test names * Normal verbosity adds tags * High verbosity add the source location of the tests Listing tests with the quiet verbosity results in about 1/4 of the previous output, which leads to measurably faster execution of `catch_discover_tests` when it does not need tags for labels. (If it does need tags, the output is about 1/2 of previous).
This commit is contained in:
14 files changed
+77
-93
No files matched your search
@@ -253,10 +253,15 @@ function(catch_discover_tests_impl)
|
||||
|
||||
make_temp_file_path(listing_output_path "${_TEST_WORKING_DIR}")
|
||||
|
||||
set(_Verbosity "quiet")
|
||||
if (add_tags)
|
||||
set(_Verbosity "normal")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${_TEST_EXECUTOR} "${_TEST_EXECUTABLE}" ${spec}
|
||||
--list-tests
|
||||
--reporter json
|
||||
--reporter "json::verbosity=${_Verbosity}"
|
||||
--out "${listing_output_path}"
|
||||
--order lex # Make sure the output order, and thus test registration order, is consistent across runs.
|
||||
OUTPUT_VARIABLE listing_output
|
||||
|
||||
Reference in new issue
Block a user