mirror of https://github.com/golang/go.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 <bcmills@google.com>
This commit is contained in:
parent
8a8adc23d4
commit
635f4b903a
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"))
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in New Issue