diff --git a/util/all_tests.go b/util/all_tests.go index 5136222d642..a931c755d58 100644 --- a/util/all_tests.go +++ b/util/all_tests.go @@ -340,12 +340,7 @@ func (t test) envMsg() string { } func (t test) getGTestShards() ([]test, error) { - if *numWorkers == 1 || len(t.Cmd) != 1 { - return []test{t}, nil - } - - // Only shard the three GTest-based tests. - if t.Cmd[0] != "crypto/crypto_test" && t.Cmd[0] != "ssl/ssl_test" { + if *numWorkers == 1 || !t.Shard { return []test{t}, nil } diff --git a/util/all_tests.json b/util/all_tests.json index 723501dfa27..15c221e2905 100644 --- a/util/all_tests.json +++ b/util/all_tests.json @@ -1,7 +1,8 @@ [ { "cmd": ["crypto/crypto_test"], - "valgrind_supp": ["valgrind_suppressions_crypto_test.supp"] + "valgrind_supp": ["valgrind_suppressions_crypto_test.supp"], + "shard": true }, { "cmd": ["crypto/crypto_test", "--gtest_also_run_disabled_tests", "--gtest_filter=BNTest.DISABLED_WycheproofPrimality"], @@ -93,7 +94,8 @@ "skip_valgrind": true }, { - "cmd": ["ssl/ssl_test"] + "cmd": ["ssl/ssl_test"], + "shard": true }, { "cmd": ["crypto/mem_test"] diff --git a/util/testconfig/testconfig.go b/util/testconfig/testconfig.go index e41c7afc65a..999c70abbae 100644 --- a/util/testconfig/testconfig.go +++ b/util/testconfig/testconfig.go @@ -25,7 +25,8 @@ type Test struct { SkipSDE bool `json:"skip_sde"` SkipValgrind bool `json:"skip_valgrind"` ValgrindSupp []string `json:"valgrind_supp"` - TargetArch string `json:"target_arch"` + TargetArch string `json:"target_arch"` + Shard bool `json:"shard"` } func ParseTestConfig(filename string) ([]Test, error) {