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/java/hiddenapi_singleton_test.go b/java/hiddenapi_singleton_test.go
index dbdab7a..97dd125 100644
--- a/java/hiddenapi_singleton_test.go
+++ b/java/hiddenapi_singleton_test.go
@@ -58,6 +58,7 @@
}
func TestHiddenAPISingleton(t *testing.T) {
+ t.Parallel()
ctx, _ := testHiddenAPIBootJars(t, `
java_library {
name: "foo",
@@ -75,6 +76,7 @@
}
func TestHiddenAPISingletonWithPrebuilt(t *testing.T) {
+ t.Parallel()
ctx, _ := testHiddenAPIBootJars(t, `
java_import {
name: "foo",
@@ -92,6 +94,7 @@
}
func TestHiddenAPISingletonWithPrebuiltUseSource(t *testing.T) {
+ t.Parallel()
ctx, _ := testHiddenAPIBootJars(t, `
java_library {
name: "foo",
@@ -121,6 +124,7 @@
}
func TestHiddenAPISingletonWithPrebuiltOverrideSource(t *testing.T) {
+ t.Parallel()
ctx, _ := testHiddenAPIBootJars(t, `
java_library {
name: "foo",
@@ -150,6 +154,7 @@
}
func TestHiddenAPISingletonSdks(t *testing.T) {
+ t.Parallel()
testCases := []struct {
name string
unbundledBuild bool