Make lots of tests run in parallel
Putting t.Parallel() in each test makes them run in parallel.
Additional t.Parallel() could be added to each subtest, although
that requires making a local copy of the loop variable for
table driven tests.
Test: m checkbuild
Change-Id: I5d9869ead441093f4d7c5757f2447385333a95a4
diff --git a/genrule/genrule_test.go b/genrule/genrule_test.go
index 4b36600..66bb221 100644
--- a/genrule/genrule_test.go
+++ b/genrule/genrule_test.go
@@ -125,6 +125,7 @@
}
func TestGenruleCmd(t *testing.T) {
+ t.Parallel()
testcases := []struct {
name string
prop string
@@ -503,6 +504,7 @@
}
func TestGenruleHashInputs(t *testing.T) {
+ t.Parallel()
// The basic idea here is to verify that the sbox command (which is
// in the Command field of the generate rule) contains a hash of the
@@ -590,6 +592,7 @@
}
func TestGenSrcs(t *testing.T) {
+ t.Parallel()
testcases := []struct {
name string
prop string
@@ -682,6 +685,7 @@
}
func TestGenruleDefaults(t *testing.T) {
+ t.Parallel()
bp := `
genrule_defaults {
name: "gen_defaults1",