summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/build/cleanbuild_test.go1
-rw-r--r--ui/build/config_test.go3
-rw-r--r--ui/build/environment_test.go6
-rw-r--r--ui/build/paths/logs_test.go2
-rw-r--r--ui/build/proc_sync_test.go5
-rw-r--r--ui/build/rbe_test.go2
-rw-r--r--ui/build/util_test.go3
-rw-r--r--ui/logger/logger_test.go7
-rw-r--r--ui/metrics/time_test.go1
-rw-r--r--ui/status/critical_path_test.go1
-rw-r--r--ui/status/kati_test.go3
-rw-r--r--ui/status/ninja_test.go1
-rw-r--r--ui/status/status_test.go4
-rw-r--r--ui/terminal/status_test.go2
-rw-r--r--ui/terminal/util_test.go1
15 files changed, 42 insertions, 0 deletions
diff --git a/ui/build/cleanbuild_test.go b/ui/build/cleanbuild_test.go
index 89f4ad9e1..be603626a 100644
--- a/ui/build/cleanbuild_test.go
+++ b/ui/build/cleanbuild_test.go
@@ -27,6 +27,7 @@ import (
)
func TestCleanOldFiles(t *testing.T) {
+ t.Parallel()
dir, err := ioutil.TempDir("", "testcleanoldfiles")
if err != nil {
t.Fatal(err)
diff --git a/ui/build/config_test.go b/ui/build/config_test.go
index 7b14c4703..35c6ed455 100644
--- a/ui/build/config_test.go
+++ b/ui/build/config_test.go
@@ -39,6 +39,7 @@ func testContext() Context {
}
func TestConfigParseArgsJK(t *testing.T) {
+ t.Parallel()
ctx := testContext()
testCases := []struct {
@@ -111,6 +112,7 @@ func TestConfigParseArgsJK(t *testing.T) {
}
func TestConfigParseArgsVars(t *testing.T) {
+ t.Parallel()
ctx := testContext()
testCases := []struct {
@@ -638,6 +640,7 @@ func TestConfigFindBuildFile(t *testing.T) {
}
func TestConfigSplitArgs(t *testing.T) {
+ t.Parallel()
tests := []struct {
// ********* Setup *********
// Test description.
diff --git a/ui/build/environment_test.go b/ui/build/environment_test.go
index 37f500f30..d8f83f4d8 100644
--- a/ui/build/environment_test.go
+++ b/ui/build/environment_test.go
@@ -21,6 +21,7 @@ import (
)
func TestEnvUnset(t *testing.T) {
+ t.Parallel()
initial := &Environment{"TEST=1", "TEST2=0"}
initial.Unset("TEST")
got := initial.Environ()
@@ -30,6 +31,7 @@ func TestEnvUnset(t *testing.T) {
}
func TestEnvUnsetMissing(t *testing.T) {
+ t.Parallel()
initial := &Environment{"TEST2=0"}
initial.Unset("TEST")
got := initial.Environ()
@@ -39,6 +41,7 @@ func TestEnvUnsetMissing(t *testing.T) {
}
func TestEnvSet(t *testing.T) {
+ t.Parallel()
initial := &Environment{}
initial.Set("TEST", "0")
got := initial.Environ()
@@ -48,6 +51,7 @@ func TestEnvSet(t *testing.T) {
}
func TestEnvSetDup(t *testing.T) {
+ t.Parallel()
initial := &Environment{"TEST=1"}
initial.Set("TEST", "0")
got := initial.Environ()
@@ -57,6 +61,7 @@ func TestEnvSetDup(t *testing.T) {
}
func TestEnvAllow(t *testing.T) {
+ t.Parallel()
initial := &Environment{"TEST=1", "TEST2=0", "TEST3=2"}
initial.Allow("TEST3", "TEST")
got := initial.Environ()
@@ -73,6 +78,7 @@ export 'BUILD_ID'='NYC'
`
func TestEnvAppendFromKati(t *testing.T) {
+ t.Parallel()
initial := &Environment{"CLANG=/usr/bin/clang", "TEST=0"}
err := initial.appendFromKati(strings.NewReader(testKatiEnvFileContents))
if err != nil {
diff --git a/ui/build/paths/logs_test.go b/ui/build/paths/logs_test.go
index 3b1005fb5..d5921a88a 100644
--- a/ui/build/paths/logs_test.go
+++ b/ui/build/paths/logs_test.go
@@ -26,6 +26,7 @@ import (
)
func TestSendLog(t *testing.T) {
+ t.Parallel()
t.Run("Short name", func(t *testing.T) {
d, err := ioutil.TempDir("", "s")
if err != nil {
@@ -105,6 +106,7 @@ func testSendLog(t *testing.T, socket string, lookup socketAddrFunc) {
}
func TestSendLogError(t *testing.T) {
+ t.Parallel()
d, err := ioutil.TempDir("", "log_socket")
if err != nil {
t.Fatal(err)
diff --git a/ui/build/proc_sync_test.go b/ui/build/proc_sync_test.go
index 857bea382..1b52fce87 100644
--- a/ui/build/proc_sync_test.go
+++ b/ui/build/proc_sync_test.go
@@ -108,6 +108,7 @@ func (c *countLock) Unlock() (err error) {
// simple test
func TestGetLock(t *testing.T) {
+ t.Parallel()
lockfile := lockOrFail(t)
defer removeTestLock(lockfile)
}
@@ -119,6 +120,7 @@ var unexpectedError = 1
var busyStatus = 2
func TestTrylock(t *testing.T) {
+ t.Parallel()
lockpath := os.Getenv(lockPathVariable)
if len(lockpath) < 1 {
checkTrylockMainProcess(t)
@@ -204,6 +206,7 @@ func getLockAndExit(lockpath string) {
}
func TestLockFirstTrySucceeds(t *testing.T) {
+ t.Parallel()
noopLogger := logger.New(ioutil.Discard)
lock := testLockCountingTo(0)
waiter := newCountWaiter(0)
@@ -216,6 +219,7 @@ func TestLockFirstTrySucceeds(t *testing.T) {
}
}
func TestLockThirdTrySucceeds(t *testing.T) {
+ t.Parallel()
noopLogger := logger.New(ioutil.Discard)
lock := testLockCountingTo(2)
waiter := newCountWaiter(2)
@@ -228,6 +232,7 @@ func TestLockThirdTrySucceeds(t *testing.T) {
}
}
func TestLockTimedOut(t *testing.T) {
+ t.Parallel()
noopLogger := logger.New(ioutil.Discard)
lock := testLockCountingTo(3)
waiter := newCountWaiter(2)
diff --git a/ui/build/rbe_test.go b/ui/build/rbe_test.go
index 8ff96bcbb..fa371bbd2 100644
--- a/ui/build/rbe_test.go
+++ b/ui/build/rbe_test.go
@@ -26,6 +26,7 @@ import (
)
func TestDumpRBEMetrics(t *testing.T) {
+ t.Parallel()
ctx := testContext()
tests := []struct {
description string
@@ -81,6 +82,7 @@ func TestDumpRBEMetrics(t *testing.T) {
}
func TestDumpRBEMetricsErrors(t *testing.T) {
+ t.Parallel()
ctx := testContext()
tests := []struct {
description string
diff --git a/ui/build/util_test.go b/ui/build/util_test.go
index b22e9977f..a06c3e931 100644
--- a/ui/build/util_test.go
+++ b/ui/build/util_test.go
@@ -25,6 +25,7 @@ import (
)
func TestEnsureEmptyDirs(t *testing.T) {
+ t.Parallel()
ctx := testContext()
defer logger.Recover(func(err error) {
t.Error(err)
@@ -52,6 +53,7 @@ func TestEnsureEmptyDirs(t *testing.T) {
}
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 TestCopyFile(t *testing.T) {
}
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)
diff --git a/ui/logger/logger_test.go b/ui/logger/logger_test.go
index 044e6f0b3..7b3791ce2 100644
--- a/ui/logger/logger_test.go
+++ b/ui/logger/logger_test.go
@@ -29,6 +29,7 @@ import (
)
func TestCreateFileWithRotation(t *testing.T) {
+ t.Parallel()
dir, err := ioutil.TempDir("", "test-rotation")
if err != nil {
t.Fatalf("Failed to get TempDir: %v", err)
@@ -96,6 +97,7 @@ func TestCreateFileWithRotation(t *testing.T) {
}
func TestPanic(t *testing.T) {
+ t.Parallel()
if os.Getenv("ACTUALLY_PANIC") == "1" {
panicValue := "foo"
log := New(&bytes.Buffer{})
@@ -128,6 +130,7 @@ func TestPanic(t *testing.T) {
}
func TestFatal(t *testing.T) {
+ t.Parallel()
if os.Getenv("ACTUALLY_FATAL") == "1" {
log := New(&bytes.Buffer{})
defer func() {
@@ -150,6 +153,7 @@ func TestFatal(t *testing.T) {
}
func TestNonFatal(t *testing.T) {
+ t.Parallel()
if os.Getenv("ACTUAL_TEST") == "1" {
log := New(&bytes.Buffer{})
defer log.Cleanup()
@@ -166,6 +170,7 @@ func TestNonFatal(t *testing.T) {
}
func TestRecoverFatal(t *testing.T) {
+ t.Parallel()
log := New(&bytes.Buffer{})
defer func() {
if p := recover(); p != nil {
@@ -182,6 +187,7 @@ func TestRecoverFatal(t *testing.T) {
}
func TestRecoverNonFatal(t *testing.T) {
+ t.Parallel()
log := New(&bytes.Buffer{})
defer func() {
if p := recover(); p == nil {
@@ -198,6 +204,7 @@ func TestRecoverNonFatal(t *testing.T) {
}
func TestRuntimePanic(t *testing.T) {
+ t.Parallel()
defer func() {
if p := recover(); p == nil {
t.Errorf("Panic not thrown")
diff --git a/ui/metrics/time_test.go b/ui/metrics/time_test.go
index d73080ab2..16d6a208f 100644
--- a/ui/metrics/time_test.go
+++ b/ui/metrics/time_test.go
@@ -22,6 +22,7 @@ import (
)
func TestEnd(t *testing.T) {
+ t.Parallel()
startTime := time.Date(2020, time.July, 13, 13, 0, 0, 0, time.UTC)
dur := time.Nanosecond * 10
initialNow := _now
diff --git a/ui/status/critical_path_test.go b/ui/status/critical_path_test.go
index 965e0ad13..e44298b89 100644
--- a/ui/status/critical_path_test.go
+++ b/ui/status/critical_path_test.go
@@ -51,6 +51,7 @@ func (t *testCriticalPath) finish(id int, endTime time.Duration) {
}
func TestCriticalPath(t *testing.T) {
+ t.Parallel()
tests := []struct {
name string
msgs func(*testCriticalPath)
diff --git a/ui/status/kati_test.go b/ui/status/kati_test.go
index f2cb81326..24a38b35a 100644
--- a/ui/status/kati_test.go
+++ b/ui/status/kati_test.go
@@ -43,6 +43,7 @@ func (l *lastOutput) Message(level MsgLevel, msg string) {
func (l *lastOutput) Flush() {}
func TestKatiNormalCase(t *testing.T) {
+ t.Parallel()
status := &Status{}
output := &lastOutput{}
status.AddOutput(output)
@@ -110,6 +111,7 @@ func TestKatiNormalCase(t *testing.T) {
}
func TestKatiExtraIncludes(t *testing.T) {
+ t.Parallel()
status := &Status{}
output := &lastOutput{}
status.AddOutput(output)
@@ -156,6 +158,7 @@ func TestKatiExtraIncludes(t *testing.T) {
}
func TestKatiFailOnError(t *testing.T) {
+ t.Parallel()
status := &Status{}
output := &lastOutput{}
status.AddOutput(output)
diff --git a/ui/status/ninja_test.go b/ui/status/ninja_test.go
index c400c97ee..232be554f 100644
--- a/ui/status/ninja_test.go
+++ b/ui/status/ninja_test.go
@@ -26,6 +26,7 @@ import (
// Tests that closing the ninja reader when nothing has opened the other end of the fifo is fast.
func TestNinjaReader_Close(t *testing.T) {
+ t.Parallel()
tempDir, err := ioutil.TempDir("", "ninja_test")
if err != nil {
t.Fatal(err)
diff --git a/ui/status/status_test.go b/ui/status/status_test.go
index 949458222..2a90c7bab 100644
--- a/ui/status/status_test.go
+++ b/ui/status/status_test.go
@@ -53,6 +53,7 @@ func (c counterOutput) Expect(t *testing.T, counts Counts) {
}
func TestBasicUse(t *testing.T) {
+ t.Parallel()
status := &Status{}
counts := &counterOutput{}
status.AddOutput(counts)
@@ -101,6 +102,7 @@ func TestBasicUse(t *testing.T) {
// For when a tool claims to have 2 actions, but finishes after one.
func TestFinishEarly(t *testing.T) {
+ t.Parallel()
status := &Status{}
counts := &counterOutput{}
status.AddOutput(counts)
@@ -129,6 +131,7 @@ func TestFinishEarly(t *testing.T) {
// For when a tool claims to have 1 action, but starts two.
func TestExtraActions(t *testing.T) {
+ t.Parallel()
status := &Status{}
counts := &counterOutput{}
status.AddOutput(counts)
@@ -149,6 +152,7 @@ func TestExtraActions(t *testing.T) {
// When a tool calls Finish() with a running Action
func TestRunningWhenFinished(t *testing.T) {
+ t.Parallel()
status := &Status{}
counts := &counterOutput{}
status.AddOutput(counts)
diff --git a/ui/terminal/status_test.go b/ui/terminal/status_test.go
index aa69dff53..da109124f 100644
--- a/ui/terminal/status_test.go
+++ b/ui/terminal/status_test.go
@@ -25,6 +25,7 @@ import (
)
func TestStatusOutput(t *testing.T) {
+ t.Parallel()
tests := []struct {
name string
calls func(stat status.StatusOutput)
@@ -266,6 +267,7 @@ func actionWithOuptutWithAnsiCodes(stat status.StatusOutput) {
}
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 82bde7c5d..b01b13305 100644
--- a/ui/terminal/util_test.go
+++ b/ui/terminal/util_test.go
@@ -19,6 +19,7 @@ import (
)
func TestStripAnsiEscapes(t *testing.T) {
+ t.Parallel()
testcases := []struct {
input string
output string