Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMartin Hořeňovský2026-02-15 20:27:15 +0100
committerGitHub2026-02-15 20:27:15 +0100
commit3a0cf7e75fdc571ff9ed25303fb268665f6260c0 (patch)
tree25cd180f4419e0ef2f6fbe3664f91b548c59d8c2 /tests
parentb6c7b217d4bcb5030ce1e04180f35d02bcf5d93f (diff)
downloadcatch3-3a0cf7e75fdc571ff9ed25303fb268665f6260c0.tar.gz
Support filtering on both sections and generators (#3069)
Not being able to filter generators to specific element has been regularly causing problems. It was possible to use a dynamic section to run tests for specific element in a generator, at least if the element had a nice string representation, but the test case would still run once per element in the generator. With this change, it is possible to have the generator return only one specific element, and do so based on the index, rather than the string representation of the element. This enables simple debugging of tests that fail for specific generator element.
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt27
-rw-r--r--tests/SelfTest/Baselines/automake.sw.approved.txt1
-rw-r--r--tests/SelfTest/Baselines/automake.sw.multi.approved.txt1
-rw-r--r--tests/SelfTest/Baselines/compact.sw.approved.txt27
-rw-r--r--tests/SelfTest/Baselines/compact.sw.multi.approved.txt27
-rw-r--r--tests/SelfTest/Baselines/console.std.approved.txt4
-rw-r--r--tests/SelfTest/Baselines/console.sw.approved.txt189
-rw-r--r--tests/SelfTest/Baselines/console.sw.multi.approved.txt189
-rw-r--r--tests/SelfTest/Baselines/junit.sw.approved.txt13
-rw-r--r--tests/SelfTest/Baselines/junit.sw.multi.approved.txt13
-rw-r--r--tests/SelfTest/Baselines/sonarqube.sw.approved.txt11
-rw-r--r--tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt11
-rw-r--r--tests/SelfTest/Baselines/tap.sw.approved.txt48
-rw-r--r--tests/SelfTest/Baselines/tap.sw.multi.approved.txt48
-rw-r--r--tests/SelfTest/Baselines/teamcity.sw.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/xml.sw.approved.txt221
-rw-r--r--tests/SelfTest/Baselines/xml.sw.multi.approved.txt221
-rw-r--r--tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp77
-rw-r--r--tests/SelfTest/IntrospectiveTests/Details.tests.cpp42
-rw-r--r--tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp5
-rwxr-xr-xtests/TestScripts/testSectionFiltering.py73
22 files changed, 1212 insertions, 40 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 887c07f6..3329e90f 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -327,6 +327,24 @@ set_tests_properties(FilteredSections::GeneratorsDontCauseInfiniteLoop
FAIL_REGULAR_EXPRESSION "inside with fov: 1" # This would mean there was no filtering
)
+add_test(NAME "FilteredSections::DifferentSimpleFilters"
+ COMMAND
+ Python3::Interpreter "${CMAKE_CURRENT_LIST_DIR}/TestScripts/testSectionFiltering.py" $<TARGET_FILE:SelfTest>
+)
+set_tests_properties("FilteredSections::DifferentSimpleFilters"
+ PROPERTIES
+ LABELS "uses-python"
+)
+
+add_test(NAME "FilteredSections::HittingGeneratorsWithSectionFilterCausesSkip"
+ COMMAND
+ $<TARGET_FILE:SelfTest> "baz" -p "c:A" -r "compact"
+)
+set_tests_properties("FilteredSections::HittingGeneratorsWithSectionFilterCausesSkip"
+ PROPERTIES
+ PASS_REGULAR_EXPRESSION "test cases: 1 \\| 1 skipped[\r\n\t ]*assertions: 1 \\| 1 passed"
+)
+
add_test(NAME ApprovalTests
COMMAND
Python3::Interpreter
@@ -679,14 +697,5 @@ set_tests_properties("Bazel::RngSeedEnvVar::MalformedValueIsIgnored"
PASS_REGULAR_EXPRESSION "Randomness seeded to: 17171717"
)
-add_test(NAME "FilteredSections::DifferentSimpleFilters"
- COMMAND
- Python3::Interpreter "${CMAKE_CURRENT_LIST_DIR}/TestScripts/testSectionFiltering.py" $<TARGET_FILE:SelfTest>
-)
-set_tests_properties("FilteredSections::DifferentSimpleFilters"
- PROPERTIES
- LABELS "uses-python"
-)
-
list(APPEND CATCH_TEST_TARGETS SelfTest)
set(CATCH_TEST_TARGETS ${CATCH_TEST_TARGETS} PARENT_SCOPE)
diff --git a/tests/SelfTest/Baselines/automake.sw.approved.txt b/tests/SelfTest/Baselines/automake.sw.approved.txt
index bc019b38..557f58f9 100644
--- a/tests/SelfTest/Baselines/automake.sw.approved.txt
+++ b/tests/SelfTest/Baselines/automake.sw.approved.txt
@@ -215,6 +215,7 @@ Nor would this
:test-result: PASS Overloaded comma or address-of operators are not used
:test-result: PASS Parse uints
:test-result: PASS Parsed tags are matched case insensitive
+:test-result: PASS Parsing path filter specs
:test-result: PASS Parsing sharding-related cli flags
:test-result: PASS Parsing tags with non-alphabetical characters is pass-through
:test-result: PASS Parsing warnings
diff --git a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt
index 3079c349..1d3bc6a1 100644
--- a/tests/SelfTest/Baselines/automake.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/automake.sw.multi.approved.txt
@@ -213,6 +213,7 @@
:test-result: PASS Overloaded comma or address-of operators are not used
:test-result: PASS Parse uints
:test-result: PASS Parsed tags are matched case insensitive
+:test-result: PASS Parsing path filter specs
:test-result: PASS Parsing sharding-related cli flags
:test-result: PASS Parsing tags with non-alphabetical characters is pass-through
:test-result: PASS Parsing warnings
diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt
index e0a691f0..a7677dcd 100644
--- a/tests/SelfTest/Baselines/compact.sw.approved.txt
+++ b/tests/SelfTest/Baselines/compact.sw.approved.txt
@@ -1425,6 +1425,29 @@ Parse.tests.cpp:<line number>: passed: !(parseUInt( "0x<hex digits>", 10 )) for:
TestSpecParser.tests.cpp:<line number>: passed: spec.hasFilters() for: true
TestSpecParser.tests.cpp:<line number>: passed: spec.getInvalidSpecs().empty() for: true
TestSpecParser.tests.cpp:<line number>: passed: spec.matches( testCase ) for: true
+CmdLine.tests.cpp:<line number>: passed: result for: {?}
+CmdLine.tests.cpp:<line number>: passed: !(config.useNewPathFilteringBehaviour) for: !false
+CmdLine.tests.cpp:<line number>: passed: result for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.useNewPathFilteringBehaviour for: true
+CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
+CmdLine.tests.cpp:<line number>: passed: result for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "*" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
+CmdLine.tests.cpp:<line number>: passed: result for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.useNewPathFilteringBehaviour for: true
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "1" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[1] == PathFilter( PathFilter::For::Section, "foobar" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
+CmdLine.tests.cpp:<line number>: passed: !(result1) for: !{?}
+CmdLine.tests.cpp:<line number>: passed: !(result2) for: !{?}
+CmdLine.tests.cpp:<line number>: passed: result for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter( PathFilter::For::Section, "foo-bar" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[1] == PathFilter( PathFilter::For::Generator, "3" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[2] == PathFilter( PathFilter::For::Generator, "123" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[3] == PathFilter( PathFilter::For::Section, "baz" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: result for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter(PathFilter::For::Section, "untrimmed" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[1] == PathFilter(PathFilter::For::Generator, "42" ) for: {?} == {?}
CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--shard-count=8" }) for: {?}
CmdLine.tests.cpp:<line number>: passed: config.shardCount == 8 for: 8 == 8
CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
@@ -2960,7 +2983,7 @@ InternalBenchmark.tests.cpp:<line number>: passed: med == 18. for: 18.0 == 18.0
InternalBenchmark.tests.cpp:<line number>: passed: q3 == 23. for: 23.0 == 23.0
Misc.tests.cpp:<line number>: passed:
Misc.tests.cpp:<line number>: passed:
-test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
-assertions: 2376 | 2175 passed | 158 failed | 43 failed as expected
+test cases: 449 | 329 passed | 96 failed | 6 skipped | 18 failed as expected
+assertions: 2399 | 2198 passed | 158 failed | 43 failed as expected
diff --git a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
index b72f4a5e..65146fc5 100644
--- a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
@@ -1423,6 +1423,29 @@ Parse.tests.cpp:<line number>: passed: !(parseUInt( "0x<hex digits>", 10 )) for:
TestSpecParser.tests.cpp:<line number>: passed: spec.hasFilters() for: true
TestSpecParser.tests.cpp:<line number>: passed: spec.getInvalidSpecs().empty() for: true
TestSpecParser.tests.cpp:<line number>: passed: spec.matches( testCase ) for: true
+CmdLine.tests.cpp:<line number>: passed: result for: {?}
+CmdLine.tests.cpp:<line number>: passed: !(config.useNewPathFilteringBehaviour) for: !false
+CmdLine.tests.cpp:<line number>: passed: result for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.useNewPathFilteringBehaviour for: true
+CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
+CmdLine.tests.cpp:<line number>: passed: result for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "*" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
+CmdLine.tests.cpp:<line number>: passed: result for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.useNewPathFilteringBehaviour for: true
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "1" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[1] == PathFilter( PathFilter::For::Section, "foobar" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
+CmdLine.tests.cpp:<line number>: passed: !(result1) for: !{?}
+CmdLine.tests.cpp:<line number>: passed: !(result2) for: !{?}
+CmdLine.tests.cpp:<line number>: passed: result for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter( PathFilter::For::Section, "foo-bar" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[1] == PathFilter( PathFilter::For::Generator, "3" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[2] == PathFilter( PathFilter::For::Generator, "123" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[3] == PathFilter( PathFilter::For::Section, "baz" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: result for: {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[0] == PathFilter(PathFilter::For::Section, "untrimmed" ) for: {?} == {?}
+CmdLine.tests.cpp:<line number>: passed: config.pathFilters[1] == PathFilter(PathFilter::For::Generator, "42" ) for: {?} == {?}
CmdLine.tests.cpp:<line number>: passed: cli.parse({ "test", "--shard-count=8" }) for: {?}
CmdLine.tests.cpp:<line number>: passed: config.shardCount == 8 for: 8 == 8
CmdLine.tests.cpp:<line number>: passed: !(result) for: !{?}
@@ -2949,7 +2972,7 @@ InternalBenchmark.tests.cpp:<line number>: passed: med == 18. for: 18.0 == 18.0
InternalBenchmark.tests.cpp:<line number>: passed: q3 == 23. for: 23.0 == 23.0
Misc.tests.cpp:<line number>: passed:
Misc.tests.cpp:<line number>: passed:
-test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
-assertions: 2376 | 2175 passed | 158 failed | 43 failed as expected
+test cases: 449 | 329 passed | 96 failed | 6 skipped | 18 failed as expected
+assertions: 2399 | 2198 passed | 158 failed | 43 failed as expected
diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt
index cd178a0c..7e9a3cdc 100644
--- a/tests/SelfTest/Baselines/console.std.approved.txt
+++ b/tests/SelfTest/Baselines/console.std.approved.txt
@@ -1743,6 +1743,6 @@ due to unexpected exception with message:
Why would you throw a std::string?
===============================================================================
-test cases: 448 | 346 passed | 76 failed | 7 skipped | 19 failed as expected
-assertions: 2354 | 2175 passed | 136 failed | 43 failed as expected
+test cases: 449 | 347 passed | 76 failed | 7 skipped | 19 failed as expected
+assertions: 2377 | 2198 passed | 136 failed | 43 failed as expected
diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt
index 4af80f47..71a38625 100644
--- a/tests/SelfTest/Baselines/console.sw.approved.txt
+++ b/tests/SelfTest/Baselines/console.sw.approved.txt
@@ -9231,6 +9231,191 @@ with expansion:
true
-------------------------------------------------------------------------------
+Parsing path filter specs
+ Only section specs leads to old filter behaviour
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( result )
+with expansion:
+ {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE_FALSE( config.useNewPathFilteringBehaviour )
+with expansion:
+ !false
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generator specs enable new filter behaviour
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( result )
+with expansion:
+ {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.useNewPathFilteringBehaviour )
+with expansion:
+ true
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generator specs do not accept stringish arguments
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE_FALSE( result )
+with expansion:
+ !{?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generator specs accept star as argument
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( result )
+with expansion:
+ {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "*" ) )
+with expansion:
+ {?} == {?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generator specs do not accept negative numbers
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE_FALSE( result )
+with expansion:
+ !{?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generic path spec enables new filter behaviour
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( result )
+with expansion:
+ {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.useNewPathFilteringBehaviour )
+with expansion:
+ true
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "1" ) )
+with expansion:
+ {?} == {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[1] == PathFilter( PathFilter::For::Section, "foobar" ) )
+with expansion:
+ {?} == {?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generic path spec for generator is validated
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE_FALSE( result )
+with expansion:
+ !{?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generic path spec without colon is rejected
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE_FALSE( result1 )
+with expansion:
+ !{?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE_FALSE( result2 )
+with expansion:
+ !{?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Using both section and generator filters creates filter stack
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( result )
+with expansion:
+ {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[0] == PathFilter( PathFilter::For::Section, "foo-bar" ) )
+with expansion:
+ {?} == {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[1] == PathFilter( PathFilter::For::Generator, "3" ) )
+with expansion:
+ {?} == {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[2] == PathFilter( PathFilter::For::Generator, "123" ) )
+with expansion:
+ {?} == {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[3] == PathFilter( PathFilter::For::Section, "baz" ) )
+with expansion:
+ {?} == {?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Section/generator filters are whitespace trimmed
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( result )
+with expansion:
+ {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[0] == PathFilter(PathFilter::For::Section, "untrimmed" ) )
+with expansion:
+ {?} == {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[1] == PathFilter(PathFilter::For::Generator, "42" ) )
+with expansion:
+ {?} == {?}
+
+-------------------------------------------------------------------------------
Parsing sharding-related cli flags
shard-count
-------------------------------------------------------------------------------
@@ -19844,6 +20029,6 @@ Misc.tests.cpp:<line number>
Misc.tests.cpp:<line number>: PASSED:
===============================================================================
-test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
-assertions: 2376 | 2175 passed | 158 failed | 43 failed as expected
+test cases: 449 | 329 passed | 96 failed | 6 skipped | 18 failed as expected
+assertions: 2399 | 2198 passed | 158 failed | 43 failed as expected
diff --git a/tests/SelfTest/Baselines/console.sw.multi.approved.txt b/tests/SelfTest/Baselines/console.sw.multi.approved.txt
index 2eadff97..26723baa 100644
--- a/tests/SelfTest/Baselines/console.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt
@@ -9229,6 +9229,191 @@ with expansion:
true
-------------------------------------------------------------------------------
+Parsing path filter specs
+ Only section specs leads to old filter behaviour
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( result )
+with expansion:
+ {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE_FALSE( config.useNewPathFilteringBehaviour )
+with expansion:
+ !false
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generator specs enable new filter behaviour
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( result )
+with expansion:
+ {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.useNewPathFilteringBehaviour )
+with expansion:
+ true
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generator specs do not accept stringish arguments
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE_FALSE( result )
+with expansion:
+ !{?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generator specs accept star as argument
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( result )
+with expansion:
+ {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "*" ) )
+with expansion:
+ {?} == {?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generator specs do not accept negative numbers
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE_FALSE( result )
+with expansion:
+ !{?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generic path spec enables new filter behaviour
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( result )
+with expansion:
+ {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.useNewPathFilteringBehaviour )
+with expansion:
+ true
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[0] == PathFilter( PathFilter::For::Generator, "1" ) )
+with expansion:
+ {?} == {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[1] == PathFilter( PathFilter::For::Section, "foobar" ) )
+with expansion:
+ {?} == {?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generic path spec for generator is validated
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE_FALSE( result )
+with expansion:
+ !{?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Generic path spec without colon is rejected
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE_FALSE( result1 )
+with expansion:
+ !{?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE_FALSE( result2 )
+with expansion:
+ !{?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Using both section and generator filters creates filter stack
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( result )
+with expansion:
+ {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[0] == PathFilter( PathFilter::For::Section, "foo-bar" ) )
+with expansion:
+ {?} == {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[1] == PathFilter( PathFilter::For::Generator, "3" ) )
+with expansion:
+ {?} == {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[2] == PathFilter( PathFilter::For::Generator, "123" ) )
+with expansion:
+ {?} == {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[3] == PathFilter( PathFilter::For::Section, "baz" ) )
+with expansion:
+ {?} == {?}
+
+-------------------------------------------------------------------------------
+Parsing path filter specs
+ Section/generator filters are whitespace trimmed
+-------------------------------------------------------------------------------
+CmdLine.tests.cpp:<line number>
+...............................................................................
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( result )
+with expansion:
+ {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[0] == PathFilter(PathFilter::For::Section, "untrimmed" ) )
+with expansion:
+ {?} == {?}
+
+CmdLine.tests.cpp:<line number>: PASSED:
+ REQUIRE( config.pathFilters[1] == PathFilter(PathFilter::For::Generator, "42" ) )
+with expansion:
+ {?} == {?}
+
+-------------------------------------------------------------------------------
Parsing sharding-related cli flags
shard-count
-------------------------------------------------------------------------------
@@ -19833,6 +20018,6 @@ Misc.tests.cpp:<line number>
Misc.tests.cpp:<line number>: PASSED:
===============================================================================
-test cases: 448 | 328 passed | 96 failed | 6 skipped | 18 failed as expected
-assertions: 2376 | 2175 passed | 158 failed | 43 failed as expected
+test cases: 449 | 329 passed | 96 failed | 6 skipped | 18 failed as expected
+assertions: 2399 | 2198 passed | 158 failed | 43 failed as expected
diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt
index e3010c82..efcd49cf 100644
--- a/tests/SelfTest/Baselines/junit.sw.approved.txt
+++ b/tests/SelfTest/Baselines/junit.sw.approved.txt
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuitesloose text artifact
>
- <testsuite name="<exe-name>" errors="17" failures="141" skipped="12" tests="2388" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
+ <testsuite name="<exe-name>" errors="17" failures="141" skipped="12" tests="2411" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<properties>
<property name="random-seed" value="1"/>
<property name="filters" value="&quot;*&quot; ~[!nonportable] ~[!benchmark] ~[approvals]"/>
@@ -1276,6 +1276,17 @@ at Message.tests.cpp:<line number>
<testcase classname="<exe-name>.global" name="Parse uints/proper inputs" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="Parse uints/Bad inputs" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="Parsed tags are matched case insensitive" time="{duration}" status="run"/>
+ <testcase classname="<exe-name>.global" name="Parsing path filter specs" time="{duration}" status="run"/>
+ <testcase classname="<exe-name>.global" name="Parsing path filter specs/Only section specs leads to old filter behaviour" time="{duration}" status="run"/>
+ <testcase classname="<exe-name>.global" name="Parsing path filter specs/Generator specs enable new filter behaviour" time="{duration}" status="run"/>
+ <testcase classname="<exe-name>.global" name="Parsing path filter specs/Generator specs do not accept stringish arguments" time="{duration}" status="run"/>
+ <testcase classname="<exe-name>.global" name="Parsing path filter specs/Generator specs accept star as argument" time="{duration}" status="run"/>
+ <testcase classname="<exe-name>.global" name="Parsing path filter specs/Generator specs do not accept negative numbers" time="{duration}" status="run"/>
+ <testcase classname="<exe-name>.global" name="Parsing path filter specs/Generic path spec enables new filter behaviour" time="{duration}" status="run"/>
+ <testcase classname="<exe-name>.global" name="Parsing path filter specs/Generic path spec for generator is validated" time="{duration}" status="run"/>
+ <testcase classname="<exe-name>.global" name="Parsing path filter specs/Generic path spec without colon is rejected" time="{duration}" status="run"/>
+ <testcase classname="<exe-name>.global" name="Parsing path filter specs/Using both section and generator filters creates filter stack" time="{duration}" status="run"/>
+ <t