]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/api: skip tests when 'os/exec' is supported but 'go build' is not
authorBryan C. Mills <bcmills@google.com>
Mon, 31 Oct 2022 18:58:40 +0000 (14:58 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 31 Oct 2022 19:20:21 +0000 (19:20 +0000)
This may fix the android-.*-emu builders, which are currently broken.

For #47257.

Change-Id: I370dad2cb8031f8f5fdfbeb9c284c4f79f58d929
Reviewed-on: https://go-review.googlesource.com/c/go/+/446638
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>

src/cmd/api/goapi_test.go

index f8ee520bdaf7c59ad7708927708316cf931bf836..464dc6832212407143bcd4ac727a77b2316c0662 100644 (file)
@@ -22,6 +22,10 @@ func TestMain(m *testing.M) {
                os.Stdout.WriteString("skipping test: platform cannot exec")
                os.Exit(0)
        }
+       if !testenv.HasGoBuild() {
+               os.Stdout.WriteString("skipping test: platform cannot 'go build' to import std packages")
+               os.Exit(0)
+       }
 
        flag.Parse()
        for _, c := range contexts {