From 323dc60712491c71ccdc5363c42df61f0a192487 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 18 Sep 2020 14:25:31 -0700 Subject: 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 --- sdk/sdk_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sdk/sdk_test.go') diff --git a/sdk/sdk_test.go b/sdk/sdk_test.go index 2e6c62a9b..a6afdc5be 100644 --- a/sdk/sdk_test.go +++ b/sdk/sdk_test.go @@ -35,6 +35,7 @@ func TestMain(m *testing.M) { } func TestDepNotInRequiredSdks(t *testing.T) { + t.Parallel() testSdkError(t, `module "myjavalib".*depends on "otherlib".*that isn't part of the required SDKs:.*`, ` sdk { name: "mysdk", @@ -95,6 +96,7 @@ func TestDepNotInRequiredSdks(t *testing.T) { // Ensure that prebuilt modules have the same effective visibility as the source // modules. func TestSnapshotVisibility(t *testing.T) { + t.Parallel() packageBp := ` package { default_visibility: ["//other/foo"], @@ -302,6 +304,7 @@ func TestPrebuiltVisibilityProperty_AddPrivate(t *testing.T) { } func TestSDkInstall(t *testing.T) { + t.Parallel() sdk := ` sdk { name: "mysdk", @@ -346,6 +349,7 @@ func (p *testPropertiesStruct) String() string { var _ propertiesContainer = (*testPropertiesStruct)(nil) func TestCommonValueOptimization(t *testing.T) { + t.Parallel() common := &testPropertiesStruct{name: "common"} structs := []propertiesContainer{ &testPropertiesStruct{ @@ -443,6 +447,7 @@ func TestCommonValueOptimization(t *testing.T) { } func TestCommonValueOptimization_InvalidArchSpecificVariants(t *testing.T) { + t.Parallel() common := &testPropertiesStruct{name: "common"} structs := []propertiesContainer{ &testPropertiesStruct{ -- cgit v1.2.3-59-g8ed1b