mirror of
https://github.com/golang/go
synced 2024-11-17 14:04:48 -07:00
cmd/api: skip tests on platforms that cannot exec
These tests execute commands using exec.Command. Change-Id: I2708d6d24762fe2b2a902b1b221cc67392bf5c41 Reviewed-on: https://go-review.googlesource.com/c/go/+/435235 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
parent
edd1273b84
commit
17078f5860
@ -18,6 +18,11 @@ import (
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
if !testenv.HasExec() {
|
||||
os.Stdout.WriteString("skipping test: platform cannot exec")
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
flag.Parse()
|
||||
for _, c := range contexts {
|
||||
c.Compiler = build.Default.Compiler
|
||||
|
Loading…
Reference in New Issue
Block a user