You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
linux / amd64
What did you do?
Build golang from sources using the following command (also note that I do have swig installed):
$ CGO_ENABLED=0 ./all.bash
What did you expect to see?
No failed tests.
What did you see instead?
Failed test:
go test proxy running at GOPROXY=http://127.0.0.1:46794/mod
--- FAIL: TestScript (0.02s)
--- FAIL: TestScript/list_swigcxx (0.58s)
script_test.go:253:
# go list should not report SWIG-generated C++ files in CompiledGoFiles. (0.000s)
# CompiledGoFiles should contain 4 files:
# a.go
# a.swigcxx.go
# _cgo_gotypes.go
# a.cgo1.go (0.582s)
# These names we see here, other than a.go, will be from the build cache,
# so we just count them. (0.000s)
> stdout a\.go
> stdout -count=3 $GOCACHE
FAIL: testdata/script/list_swigcxx.txt:17: no match for `(?m)/usr/local/go/pkg/obj/go-build` found in stdout
FAIL
FAIL cmd/go 52.187s
Also noticed the script list_swigcxx.txt does not have a way to skip the test if CGO_ENABLED is set to 0, only skips if the following are not found: swig and g++.
Workaround: Remove the test script list_swigcxx.txt and the build completed all tests.
The text was updated successfully, but these errors were encountered:
bcmills
changed the title
go/build: Build with CGO_ENABLED=0 fails one test if swig is installed.
cmd/go: TestScript/list_swigcxx with CGO_ENABLED=0 fails if swig is installed.
Dec 16, 2021
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?linux / amd64
What did you do?
Build golang from sources using the following command (also note that I do have swig installed):
What did you expect to see?
No failed tests.
What did you see instead?
Failed test:
Also noticed the script
list_swigcxx.txt
does not have a way to skip the test ifCGO_ENABLED
is set to 0, only skips if the following are not found:swig
andg++
.Workaround: Remove the test script
list_swigcxx.txt
and the build completed all tests.The text was updated successfully, but these errors were encountered: