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/terminal/status_test.go b/ui/terminal/status_test.go
index aa69dff..da10912 100644
--- a/ui/terminal/status_test.go
+++ b/ui/terminal/status_test.go
@@ -25,6 +25,7 @@
)
func TestStatusOutput(t *testing.T) {
+ t.Parallel()
tests := []struct {
name string
calls func(stat status.StatusOutput)
@@ -266,6 +267,7 @@
}
func TestSmartStatusOutputWidthChange(t *testing.T) {
+ t.Parallel()
os.Setenv(tableHeightEnVar, "")
smart := &fakeSmartTerminal{termWidth: 40}
diff --git a/ui/terminal/util_test.go b/ui/terminal/util_test.go
index 82bde7c..b01b133 100644
--- a/ui/terminal/util_test.go
+++ b/ui/terminal/util_test.go
@@ -19,6 +19,7 @@
)
func TestStripAnsiEscapes(t *testing.T) {
+ t.Parallel()
testcases := []struct {
input string
output string