diff options
| author | Ben Dunkin | 2021-07-11 12:46:05 -0700 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-10-27 17:24:30 +0200 |
| commit | 3087e19cc72ccb6caddc42ec2f39eebc56160754 (patch) | |
| tree | 36d3adb84f1876a7136c169b219637343055a44d /src/catch2/interfaces | |
| parent | 6456ee8b01c6133e553b99da2f7420e7b20da7ec (diff) | |
| download | catch3-3087e19cc72ccb6caddc42ec2f39eebc56160754.tar.gz | |
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.
Diffstat (limited to 'src/catch2/interfaces')
| -rw-r--r-- | src/catch2/interfaces/catch_interfaces_config.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/catch2/interfaces/catch_interfaces_config.hpp b/src/catch2/interfaces/catch_interfaces_config.hpp index e40cf702..bd0c8a40 100644 --- a/src/catch2/interfaces/catch_interfaces_config.hpp +++ b/src/catch2/interfaces/catch_interfaces_config.hpp @@ -74,6 +74,8 @@ namespace Catch { virtual std::vector<std::string> const& getTestsOrTags() const = 0; virtual TestRunOrder runOrder() const = 0; virtual uint32_t rngSeed() const = 0; + virtual unsigned int shardCount() const = 0; + virtual unsigned int shardIndex() const = 0; virtual UseColour useColour() const = 0; virtual std::vector<std::string> const& getSectionsToRun() const = 0; virtual Verbosity verbosity() const = 0; |