From: Michael Matloob Date: Mon, 13 Jan 2020 20:53:03 +0000 (-0500) Subject: cmd/go: add a few more calls to t.Parallel X-Git-Tag: go1.15beta1~1192 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=635f4b903af0726886a63569d3771b6004fb055a;p=gostls13.git cmd/go: add a few more calls to t.Parallel Change-Id: If8fe5be9d2cd174862c09bb4ce079f524eb33ff3 Reviewed-on: https://go-review.googlesource.com/c/go/+/214580 Reviewed-by: Bryan C. Mills --- diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index 2f50d7d83d..f67cf2583a 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -2514,8 +2514,9 @@ func TestExecutableGOROOT(t *testing.T) { // Note: Must not call tg methods inside subtests: tg is attached to outer t. tg := testgo(t) - tg.unsetenv("GOROOT") defer tg.cleanup() + tg.parallel() + tg.unsetenv("GOROOT") check := func(t *testing.T, exe, want string) { cmd := exec.Command(exe, "env", "GOROOT") diff --git a/src/cmd/go/help_test.go b/src/cmd/go/help_test.go index 9bcab820ce..78d63ff05e 100644 --- a/src/cmd/go/help_test.go +++ b/src/cmd/go/help_test.go @@ -14,6 +14,8 @@ import ( ) func TestDocsUpToDate(t *testing.T) { + t.Parallel() + if !modload.Enabled() { t.Skipf("help.Help in GOPATH mode is configured by main.main") } diff --git a/src/cmd/go/note_test.go b/src/cmd/go/note_test.go index 6d3b9b80f4..089e2f3376 100644 --- a/src/cmd/go/note_test.go +++ b/src/cmd/go/note_test.go @@ -18,6 +18,8 @@ func TestNoteReading(t *testing.T) { // both in internal and external linking mode. tg := testgo(t) defer tg.cleanup() + tg.parallel() + tg.tempFile("hello.go", `package main; func main() { print("hello, world\n") }`) const buildID = "TestNoteReading-Build-ID" tg.run("build", "-ldflags", "-buildid="+buildID, "-o", tg.path("hello.exe"), tg.path("hello.go")) diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go index fa32a361f6..1dca486c91 100644 --- a/src/cmd/go/script_test.go +++ b/src/cmd/go/script_test.go @@ -1246,6 +1246,8 @@ var diffTests = []struct { } func TestDiff(t *testing.T) { + t.Parallel() + for _, tt := range diffTests { // Turn spaces into \n. text1 := strings.ReplaceAll(tt.text1, " ", "\n")