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
diff --git a/ui/build/util_test.go b/ui/build/util_test.go
index b22e997..a06c3e9 100644
--- a/ui/build/util_test.go
+++ b/ui/build/util_test.go
@@ -25,6 +25,7 @@
)
func TestEnsureEmptyDirs(t *testing.T) {
+ t.Parallel()
ctx := testContext()
defer logger.Recover(func(err error) {
t.Error(err)
@@ -52,6 +53,7 @@
}
func TestCopyFile(t *testing.T) {
+ t.Parallel()
tmpDir, err := ioutil.TempDir("", "test_copy_file")
if err != nil {
t.Fatalf("failed to create temporary directory to hold test text files: %v", err)
@@ -86,6 +88,7 @@
}
func TestCopyFileErrors(t *testing.T) {
+ t.Parallel()
tmpDir, err := ioutil.TempDir("", "test_copy_file_errors")
if err != nil {
t.Fatalf("failed to create temporary directory to hold test text files: %v", err)