]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/api: skip tests on platforms that cannot exec
authorTobias Klauser <tklauser@distanz.ch>
Tue, 27 Sep 2022 14:13:40 +0000 (16:13 +0200)
committerGopher Robot <gobot@golang.org>
Tue, 27 Sep 2022 18:26:56 +0000 (18:26 +0000)
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>

src/cmd/api/goapi_test.go

index e905e65b24aa92006060ddfd4bad655ce10c9855..f8ee520bdaf7c59ad7708927708316cf931bf836 100644 (file)
@@ -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