mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 21:35:40 +02:00
Allow test sharding for e.g. Bazel test sharding feature
This greatly simplifies running Catch2 tests in single binary in parallel from external test runners. Instead of having to shard the tests by tags/test names, an external test runner can now just ask for test shard 2 (out of X), and execute that in single process, without having to know what tests are actually in the shard. Note that sharding also applies to test listing, and happens after tests were ordered according to the `--order` feature.
This commit is contained in:

committed by
Martin Hořeňovský

parent
6456ee8b01
commit
3087e19cc7
@@ -2468,6 +2468,18 @@ ok {test-number} - config.benchmarkNoAnalysis for: true
|
||||
ok {test-number} - cli.parse({ "test", "--benchmark-warmup-time=10" }) for: {?}
|
||||
# Process can be configured on command line
|
||||
ok {test-number} - config.benchmarkWarmupTime == 10 for: 10 == 10
|
||||
# Process can be configured on command line
|
||||
ok {test-number} - cli.parse({ "test", "--shard-count=8"}) for: {?}
|
||||
# Process can be configured on command line
|
||||
ok {test-number} - config.shardCount == 8 for: 8 == 8
|
||||
# Process can be configured on command line
|
||||
ok {test-number} - cli.parse({ "test", "--shard-index=2"}) for: {?}
|
||||
# Process can be configured on command line
|
||||
ok {test-number} - config.shardIndex == 2 for: 2 == 2
|
||||
# Process can be configured on command line
|
||||
ok {test-number} - !result for: true
|
||||
# Process can be configured on command line
|
||||
ok {test-number} - result.errorMessage(), ContainsSubstring( "The shard count must be greater than 0" ) for: "The shard count must be greater than 0" contains: "The shard count must be greater than 0"
|
||||
# Product with differing arities - std::tuple<int, double, float>
|
||||
ok {test-number} - std::tuple_size<TestType>::value >= 1 for: 3 >= 1
|
||||
# Product with differing arities - std::tuple<int, double>
|
||||
@@ -4266,5 +4278,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
|
||||
ok {test-number} -
|
||||
# xmlentitycheck
|
||||
ok {test-number} -
|
||||
1..2132
|
||||
1..2138
|
||||
|
||||
|
Reference in New Issue
Block a user