aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime-gdb_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2019-04-26 06:56:58 -0700
committerIan Lance Taylor <iant@golang.org>2019-04-26 17:13:13 +0000
commit80704ec3fa79e6efb50124e8063b31a4c032a1ff (patch)
tree4a49a8dfa00ff8913c54bfa33fae0583d4de761f /src/runtime/runtime-gdb_test.go
parent3f7276c029162043f938e173e63f55d26462a2ca (diff)
downloadgo-80704ec3fa79e6efb50124e8063b31a4c032a1ff.tar.gz
go-80704ec3fa79e6efb50124e8063b31a4c032a1ff.zip
runtime: test for cgo build tag in TestGdbPythonCgo
Testing whether cgo is enabled in go/build is not the same as testing whether the go tool supports cgo. They differ, for example, when using GOARCH=386 on an amd64 system, as for a cross-build cgo is disabled by default. Change-Id: Ib59106c92a3131b73ac6a91c0f7658a1769acf73 Reviewed-on: https://go-review.googlesource.com/c/go/+/174098 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/runtime-gdb_test.go')
-rw-r--r--src/runtime/runtime-gdb_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go
index 66f275969b..63d6e52dea 100644
--- a/src/runtime/runtime-gdb_test.go
+++ b/src/runtime/runtime-gdb_test.go
@@ -7,7 +7,6 @@ package runtime_test
import (
"bytes"
"fmt"
- "go/build"
"internal/testenv"
"io/ioutil"
"os"
@@ -140,8 +139,8 @@ func TestGdbPythonCgo(t *testing.T) {
}
func testGdbPython(t *testing.T, cgo bool) {
- if cgo && !build.Default.CgoEnabled {
- t.Skip("skipping because cgo is not enabled")
+ if cgo {
+ testenv.MustHaveCGO(t)
}
checkGdbEnvironment(t)