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:
Colin Cross
2020-09-18 14:25:31 -07:00
parent 56a8321c21
commit 323dc60712
117 changed files with 661 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ import (
)
func TestCollectJavaLibraryPropertiesAddLibsDeps(t *testing.T) {
t.Parallel()
expected := []string{"Foo", "Bar"}
module := LibraryFactory().(*Library)
module.properties.Libs = append(module.properties.Libs, expected...)
@@ -35,6 +36,7 @@ func TestCollectJavaLibraryPropertiesAddLibsDeps(t *testing.T) {
}
func TestCollectJavaLibraryPropertiesAddStaticLibsDeps(t *testing.T) {
t.Parallel()
expected := []string{"Foo", "Bar"}
module := LibraryFactory().(*Library)
module.properties.Static_libs = append(module.properties.Static_libs, expected...)
@@ -48,6 +50,7 @@ func TestCollectJavaLibraryPropertiesAddStaticLibsDeps(t *testing.T) {
}
func TestCollectJavaLibraryPropertiesAddScrs(t *testing.T) {
t.Parallel()
expected := []string{"Foo", "Bar"}
module := LibraryFactory().(*Library)
module.expandIDEInfoCompiledSrcs = append(module.expandIDEInfoCompiledSrcs, expected...)
@@ -61,6 +64,7 @@ func TestCollectJavaLibraryPropertiesAddScrs(t *testing.T) {
}
func TestCollectJavaLibraryPropertiesAddAidlIncludeDirs(t *testing.T) {
t.Parallel()
expected := []string{"Foo", "Bar"}
module := LibraryFactory().(*Library)
module.deviceProperties.Aidl.Include_dirs = append(module.deviceProperties.Aidl.Include_dirs, expected...)
@@ -74,6 +78,7 @@ func TestCollectJavaLibraryPropertiesAddAidlIncludeDirs(t *testing.T) {
}
func TestCollectJavaLibraryPropertiesAddJarjarRules(t *testing.T) {
t.Parallel()
expected := "Jarjar_rules.txt"
module := LibraryFactory().(*Library)
module.expandJarjarRules = android.PathForTesting(expected)