Commit ca70ada2 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

cmd/dist: don't run cmd tests on js/wasm

Updates #25911
Fixes #35220

Change-Id: Id063722d181a12d926801d2e5bb1a9becb463a90
Reviewed-on: https://go-review.googlesource.com/c/go/+/204040
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent f2dfbe98
...@@ -418,7 +418,7 @@ func (t *tester) registerTests() { ...@@ -418,7 +418,7 @@ func (t *tester) registerTests() {
cmd.Args = append(cmd.Args, "-tags=race") cmd.Args = append(cmd.Args, "-tags=race")
} }
cmd.Args = append(cmd.Args, "std") cmd.Args = append(cmd.Args, "std")
if !t.race { if t.shouldTestCmd() {
cmd.Args = append(cmd.Args, "cmd") cmd.Args = append(cmd.Args, "cmd")
} }
cmd.Stderr = new(bytes.Buffer) cmd.Stderr = new(bytes.Buffer)
...@@ -1452,6 +1452,17 @@ func (t *tester) shouldUsePrecompiledStdTest() bool { ...@@ -1452,6 +1452,17 @@ func (t *tester) shouldUsePrecompiledStdTest() bool {
return err == nil return err == nil
} }
func (t *tester) shouldTestCmd() bool {
if t.race {
return false
}
if goos == "js" && goarch == "wasm" {
// Issues 25911, 35220
return false
}
return true
}
// prebuiltGoPackageTestBinary returns the path where we'd expect // prebuiltGoPackageTestBinary returns the path where we'd expect
// the pre-built go test binary to be on disk when dist test is run with // the pre-built go test binary to be on disk when dist test is run with
// a single argument. // a single argument.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment