Default to randomized test case order

This commit is contained in:
Martin Hořeňovský 2025-04-29 17:00:09 +02:00
parent b9c018b38a
commit a483b6d7d3
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
2 changed files with 7 additions and 2 deletions

View File

@ -76,7 +76,7 @@ namespace Catch {
WarnAbout::What warnings = WarnAbout::Nothing; WarnAbout::What warnings = WarnAbout::Nothing;
ShowDurations showDurations = ShowDurations::DefaultForReporter; ShowDurations showDurations = ShowDurations::DefaultForReporter;
double minDuration = -1; double minDuration = -1;
TestRunOrder runOrder = TestRunOrder::Declared; TestRunOrder runOrder = TestRunOrder::Randomized;
ColourMode defaultColourMode = ColourMode::PlatformDefault; ColourMode defaultColourMode = ColourMode::PlatformDefault;
WaitForKeypress::When waitForKeypress = WaitForKeypress::Never; WaitForKeypress::When waitForKeypress = WaitForKeypress::Never;

View File

@ -46,10 +46,15 @@ env["TEST_SHARD_INDEX"] = "0"
env["TEST_TOTAL_SHARDS"] = "2" env["TEST_TOTAL_SHARDS"] = "2"
env["TEST_SHARD_STATUS_FILE"] = info_file_path env["TEST_SHARD_STATUS_FILE"] = info_file_path
cmd = [
bin_path,
# We rely on the test order being deterministic
'--order', 'decl'
]
try: try:
ret = subprocess.run( ret = subprocess.run(
bin_path, cmd,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, stderr=subprocess.PIPE,
check=True, check=True,