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
This commit is contained in:
@@ -58,6 +58,7 @@ func testHiddenAPIUnbundled(t *testing.T, unbundled bool) (*android.TestContext,
|
||||
}
|
||||
|
||||
func TestHiddenAPISingleton(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx, _ := testHiddenAPIBootJars(t, `
|
||||
java_library {
|
||||
name: "foo",
|
||||
@@ -75,6 +76,7 @@ func TestHiddenAPISingleton(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestHiddenAPISingletonWithPrebuilt(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx, _ := testHiddenAPIBootJars(t, `
|
||||
java_import {
|
||||
name: "foo",
|
||||
@@ -92,6 +94,7 @@ func TestHiddenAPISingletonWithPrebuilt(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestHiddenAPISingletonWithPrebuiltUseSource(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx, _ := testHiddenAPIBootJars(t, `
|
||||
java_library {
|
||||
name: "foo",
|
||||
@@ -121,6 +124,7 @@ func TestHiddenAPISingletonWithPrebuiltUseSource(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestHiddenAPISingletonWithPrebuiltOverrideSource(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx, _ := testHiddenAPIBootJars(t, `
|
||||
java_library {
|
||||
name: "foo",
|
||||
@@ -150,6 +154,7 @@ func TestHiddenAPISingletonWithPrebuiltOverrideSource(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestHiddenAPISingletonSdks(t *testing.T) {
|
||||
t.Parallel()
|
||||
testCases := []struct {
|
||||
name string
|
||||
unbundledBuild bool
|
||||
|
Reference in New Issue
Block a user