]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: add a few more calls to t.Parallel
authorMichael Matloob <matloob@golang.org>
Mon, 13 Jan 2020 20:53:03 +0000 (15:53 -0500)
committerMichael Matloob <matloob@golang.org>
Wed, 19 Feb 2020 21:58:05 +0000 (21:58 +0000)
Change-Id: If8fe5be9d2cd174862c09bb4ce079f524eb33ff3
Reviewed-on: https://go-review.googlesource.com/c/go/+/214580
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/go_test.go
src/cmd/go/help_test.go
src/cmd/go/note_test.go
src/cmd/go/script_test.go

index 2f50d7d83dc9e8f7cedce031c4ea605afcfbf8d4..f67cf2583a9c18c4eb69869636b74e4ba389c47c 100644 (file)
@@ -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")
index 9bcab820ce65648dc2c632477592c1672f54acd8..78d63ff05e90c9f78c260355450bd3b456d1115a 100644 (file)
@@ -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")
        }
index 6d3b9b80f476ae92c401596ff6f8fb932b50adac..089e2f33760266af336afe07d85425f73ca5c5e0 100644 (file)
@@ -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"))
index fa32a361f6188a5c75ea4b9b869c4ee86dffc541..1dca486c917d3b38b9e852032141b790f5a97226 100644 (file)
@@ -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")