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:
@@ -61,6 +61,7 @@ func testShBinary(t *testing.T, bp string) (*android.TestContext, android.Config
|
||||
}
|
||||
|
||||
func TestShTestSubDir(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx, config := testShBinary(t, `
|
||||
sh_test {
|
||||
name: "foo",
|
||||
@@ -81,6 +82,7 @@ func TestShTestSubDir(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestShTest(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx, config := testShBinary(t, `
|
||||
sh_test {
|
||||
name: "foo",
|
||||
@@ -111,6 +113,7 @@ func TestShTest(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestShTest_dataModules(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx, config := testShBinary(t, `
|
||||
sh_test {
|
||||
name: "foo",
|
||||
@@ -170,6 +173,7 @@ func TestShTest_dataModules(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestShTestHost(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx, _ := testShBinary(t, `
|
||||
sh_test_host {
|
||||
name: "foo",
|
||||
@@ -190,6 +194,7 @@ func TestShTestHost(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestShTestHost_dataDeviceModules(t *testing.T) {
|
||||
t.Parallel()
|
||||
ctx, config := testShBinary(t, `
|
||||
sh_test_host {
|
||||
name: "foo",
|
||||
|
Reference in New Issue
Block a user