diff options
author | 2020-09-18 14:25:31 -0700 | |
---|---|---|
committer | 2020-10-06 15:12:22 -0700 | |
commit | 323dc60712491c71ccdc5363c42df61f0a192487 (patch) | |
tree | 5ba86007fb0f7d2536671cbc64e91b1eac304270 /sdk/sdk_test.go | |
parent | 56a8321c210bf73c7b9f177849ff4a6b6192d237 (diff) |
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
Diffstat (limited to 'sdk/sdk_test.go')
-rw-r--r-- | sdk/sdk_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
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{ |