Skip to content

Commit a483b6d

Browse files
committed
Default to randomized test case order
1 parent b9c018b commit a483b6d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/catch2/catch_config.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ namespace Catch {
7676
WarnAbout::What warnings = WarnAbout::Nothing;
7777
ShowDurations showDurations = ShowDurations::DefaultForReporter;
7878
double minDuration = -1;
79-
TestRunOrder runOrder = TestRunOrder::Declared;
79+
TestRunOrder runOrder = TestRunOrder::Randomized;
8080
ColourMode defaultColourMode = ColourMode::PlatformDefault;
8181
WaitForKeypress::When waitForKeypress = WaitForKeypress::Never;
8282

tests/TestScripts/testBazelSharding.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,15 @@
4646
env["TEST_TOTAL_SHARDS"] = "2"
4747
env["TEST_SHARD_STATUS_FILE"] = info_file_path
4848

49+
cmd = [
50+
bin_path,
51+
# We rely on the test order being deterministic
52+
'--order', 'decl'
53+
]
4954

5055
try:
5156
ret = subprocess.run(
52-
bin_path,
57+
cmd,
5358
stdout=subprocess.PIPE,
5459
stderr=subprocess.PIPE,
5560
check=True,

0 commit comments

Comments
 (0)