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/androidmk_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'java/androidmk_test.go') diff --git a/java/androidmk_test.go b/java/androidmk_test.go index 075b7aa6f..359d8d7c4 100644 --- a/java/androidmk_test.go +++ b/java/androidmk_test.go @@ -23,6 +23,7 @@ import ( ) func TestRequired(t *testing.T) { + t.Parallel() ctx, config := testJava(t, ` java_library { name: "foo", @@ -42,6 +43,7 @@ func TestRequired(t *testing.T) { } func TestHostdex(t *testing.T) { + t.Parallel() ctx, config := testJava(t, ` java_library { name: "foo", @@ -72,6 +74,7 @@ func TestHostdex(t *testing.T) { } func TestHostdexRequired(t *testing.T) { + t.Parallel() ctx, config := testJava(t, ` java_library { name: "foo", @@ -103,6 +106,7 @@ func TestHostdexRequired(t *testing.T) { } func TestHostdexSpecificRequired(t *testing.T) { + t.Parallel() ctx, config := testJava(t, ` java_library { name: "foo", @@ -136,6 +140,7 @@ func TestHostdexSpecificRequired(t *testing.T) { } func TestDistWithTag(t *testing.T) { + t.Parallel() ctx, config := testJava(t, ` java_library { name: "foo_without_tag", @@ -172,6 +177,7 @@ func TestDistWithTag(t *testing.T) { } func TestDistWithDest(t *testing.T) { + t.Parallel() ctx, config := testJava(t, ` java_library { name: "foo", @@ -208,6 +214,7 @@ func TestDistWithDest(t *testing.T) { } func TestDistsWithAllProperties(t *testing.T) { + t.Parallel() ctx, config := testJava(t, ` java_library { name: "foo", @@ -265,6 +272,7 @@ func TestDistsWithAllProperties(t *testing.T) { } func TestDistsWithTag(t *testing.T) { + t.Parallel() ctx, config := testJava(t, ` java_library { name: "foo_without_tag", @@ -312,6 +320,7 @@ func TestDistsWithTag(t *testing.T) { } func TestJavaSdkLibrary_RequireXmlPermissionFile(t *testing.T) { + t.Parallel() ctx, config := testJava(t, ` java_sdk_library { name: "foo-shared_library", -- cgit v1.2.3-59-g8ed1b