summaryrefslogtreecommitdiff
path: root/rust/compiler_test.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2020-09-18 14:25:31 -0700
committerColin Cross <ccross@android.com>2020-10-06 15:12:22 -0700
commit323dc60712491c71ccdc5363c42df61f0a192487 (patch)
tree5ba86007fb0f7d2536671cbc64e91b1eac304270 /rust/compiler_test.go
parent56a8321c210bf73c7b9f177849ff4a6b6192d237 (diff)
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
Diffstat (limited to 'rust/compiler_test.go')
-rw-r--r--rust/compiler_test.go5
1 files changed, 5 insertions, 0 deletions
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",