Skip to content

Commit

Permalink
Configure explicitly whether to shard tests
Browse files Browse the repository at this point in the history
This removes a place where we make hard-coded assumes about test names.
Also it shards pki_test, as that test suite is large enough to benefit
from it.

Change-Id: I392254b73a2df2f022ccf13508552372c103bff7
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/61285
Reviewed-by: Bob Beck <[email protected]>
Commit-Queue: Bob Beck <[email protected]>
(cherry picked from commit 63f4b806d6085c1a75e40da7d2de972e781ef588)
  • Loading branch information
davidben authored and samuel40791765 committed Nov 13, 2023
1 parent ba28664 commit 2768999
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
7 changes: 1 addition & 6 deletions util/all_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
6 changes: 4 additions & 2 deletions util/all_tests.json
Original file line number Diff line number Diff line change
@@ -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"],
Expand Down Expand Up @@ -93,7 +94,8 @@
"skip_valgrind": true
},
{
"cmd": ["ssl/ssl_test"]
"cmd": ["ssl/ssl_test"],
"shard": true
},
{
"cmd": ["crypto/mem_test"]
Expand Down
3 changes: 2 additions & 1 deletion util/testconfig/testconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2768999

Please sign in to comment.