catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Report used filters in the TAP reporter
- Commit
0ce8c25566176acbce2e887445d8c33306c184bc- Author
- Martin Hořeňovský ·
- Parents
6185d0cc0a73
Changes
src/catch2/reporters/catch_reporter_tap.cpp | 6 ++++++ tests/SelfTest/Baselines/tap.sw.approved.txt | 1 + tests/SelfTest/Baselines/tap.sw.multi.approved.txt | 1 + 3 files changed, 8 insertions(+) diff --git a/src/catch2/reporters/catch_reporter_tap.cpp b/src/catch2/reporters/catch_reporter_tap.cpp index 6058f242..d433d986 100644 --- a/src/catch2/reporters/catch_reporter_tap.cpp +++ b/src/catch2/reporters/catch_reporter_tap.cpp @@ -10,6 +10,8 @@ #include <catch2/internal/catch_string_manip.hpp> #include <catch2/catch_test_case_info.hpp> #include <catch2/interfaces/catch_interfaces_config.hpp> +#include <catch2/catch_test_spec.hpp> +#include <catch2/reporters/catch_reporter_helpers.hpp> #include <algorithm> #include <iterator> @@ -186,6 +188,10 @@ namespace Catch { } // End anonymous namespace void TAPReporter::testRunStarting( TestRunInfo const& ) { + if ( m_config->testSpec().hasFilters() ) { + m_stream << "# filters: " + << serializeFilters( m_config->getTestsOrTags() ) << '\n'; + } m_stream << "# rng-seed: " << m_config->rngSeed() << '\n'; } diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt index 53f1c437..28816cc5 100644 --- a/tests/SelfTest/Baselines/tap.sw.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.approved.txt @@ -1,3 +1,4 @@ +# filters: ~[!nonportable]~[!benchmark]~[approvals] * # rng-seed: 1 # # A test name that starts with a # ok {test-number} - with 1 message: 'yay' diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt index 303ba842..0f39a170 100644 --- a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt @@ -1,3 +1,4 @@ +# filters: ~[!nonportable]~[!benchmark]~[approvals] * # rng-seed: 1 # # A test name that starts with a # ok {test-number} - with 1 message: 'yay'