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 --- rust/compiler_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'rust/compiler_test.go') diff --git a/rust/compiler_test.go b/rust/compiler_test.go index a25523c05..70f0dffad 100644 --- a/rust/compiler_test.go +++ b/rust/compiler_test.go @@ -23,6 +23,7 @@ import ( // Test that feature flags are being correctly generated. func TestFeaturesToFlags(t *testing.T) { + t.Parallel() ctx := testRust(t, ` rust_library_host_dylib { name: "libfoo", @@ -44,6 +45,7 @@ func TestFeaturesToFlags(t *testing.T) { // Test that we reject multiple source files. func TestEnforceSingleSourceFile(t *testing.T) { + t.Parallel() singleSrcError := "srcs can only contain one path for a rust file and source providers prefixed by \":\"" @@ -78,6 +80,7 @@ func TestEnforceSingleSourceFile(t *testing.T) { } func TestInstallDir(t *testing.T) { + t.Parallel() ctx := testRust(t, ` rust_library_dylib { name: "libfoo", @@ -108,6 +111,7 @@ func TestInstallDir(t *testing.T) { } func TestLints(t *testing.T) { + t.Parallel() bp := ` // foo uses the default value of lints @@ -180,6 +184,7 @@ func TestLints(t *testing.T) { // Test that devices are linking the stdlib dynamically func TestStdDeviceLinkage(t *testing.T) { + t.Parallel() ctx := testRust(t, ` rust_binary { name: "fizz", -- cgit v1.2.3-59-g8ed1b