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 --- java/jdeps_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'java/jdeps_test.go') diff --git a/java/jdeps_test.go b/java/jdeps_test.go index 874d1d7c0..46e72967c 100644 --- a/java/jdeps_test.go +++ b/java/jdeps_test.go @@ -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) -- cgit v1.2.3-59-g8ed1b