From 844cb6a6646454aaba28b602cf49284df32cdc9f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 29 Jan 2025 15:53:21 -0800 Subject: Add t.Parallel() to java tests Speeds up go test ./java from 32 seconds to 9 seconds. Test: go test ./java Change-Id: I4c6640e787c0744c6dfda03b7382839b452e24cf --- java/system_modules_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'java/system_modules_test.go') diff --git a/java/system_modules_test.go b/java/system_modules_test.go index b05b0e497..b7a99b51a 100644 --- a/java/system_modules_test.go +++ b/java/system_modules_test.go @@ -51,6 +51,7 @@ var addSourceSystemModules = android.FixtureAddTextFile("source/Android.bp", ` `) func TestJavaSystemModules(t *testing.T) { + t.Parallel() result := android.GroupFixturePreparers(prepareForJavaTest, addSourceSystemModules).RunTest(t) // check the existence of the source module @@ -78,6 +79,7 @@ var addPrebuiltSystemModules = android.FixtureAddTextFile("prebuilts/Android.bp" `) func TestJavaSystemModulesImport(t *testing.T) { + t.Parallel() result := android.GroupFixturePreparers(prepareForJavaTest, addPrebuiltSystemModules).RunTest(t) // check the existence of the renamed prebuilt module @@ -90,6 +92,7 @@ func TestJavaSystemModulesImport(t *testing.T) { } func TestJavaSystemModulesMixSourceAndPrebuilt(t *testing.T) { + t.Parallel() result := android.GroupFixturePreparers( prepareForJavaTest, addSourceSystemModules, @@ -114,6 +117,7 @@ func TestJavaSystemModulesMixSourceAndPrebuilt(t *testing.T) { } func TestMultipleSystemModulesPrebuilts(t *testing.T) { + t.Parallel() bp := ` // an rdep java_library { -- cgit v1.2.3-59-g8ed1b