Change-Id: If8fe5be9d2cd174862c09bb4ce079f524eb33ff3
Reviewed-on: https://go-review.googlesource.com/c/go/+/214580
Reviewed-by: Bryan C. Mills <bcmills@google.com>
// 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")
)
func TestDocsUpToDate(t *testing.T) {
+ t.Parallel()
+
if !modload.Enabled() {
t.Skipf("help.Help in GOPATH mode is configured by main.main")
}
// 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"))
}
func TestDiff(t *testing.T) {
+ t.Parallel()
+
for _, tt := range diffTests {
// Turn spaces into \n.
text1 := strings.ReplaceAll(tt.text1, " ", "\n")