diff options
author | Nehal J Wani <nehaljw.kkd1@gmail.com> | 2021-01-27 16:24:14 +0000 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2021-01-27 18:21:21 +0000 |
commit | ff9e8364c6501e9092564dd1e1fadf27f91b2fbb (patch) | |
tree | 73af9bd52b3ec07a87206406fc831d1904e68fa0 | |
parent | cd176b361591420f84fcbcaaf0cf24351aed0995 (diff) | |
download | go-ff9e8364c6501e9092564dd1e1fadf27f91b2fbb.tar.gz go-ff9e8364c6501e9092564dd1e1fadf27f91b2fbb.zip |
cmd/go: skip issue33139 when the 'cc' script command is unavailable
With CGO disabled, the test suite tries to run the following and fail:
CGO_ENABLED=0 go test -run=TestScript/link_syso_issue33139 cmd/go
go test proxy running at GOPROXY=http://127.0.0.1:38829/mod
--- FAIL: TestScript (0.01s)
--- FAIL: TestScript/link_syso_issue33139 (0.01s)
script_test.go:215:
# Test that we can use the external linker with a host syso file that is
# embedded in a package, that is referenced by a Go assembly function.
# See issue 33139. (0.000s)
# External linking is not supported on linux/ppc64.
# See: https://github.com/golang/go/issues/8912 (0.000s)
# External linking is not supported on linux/riscv64.
# See: https://github.com/golang/go/issues/36739 (0.001s)
> [linux] [riscv64] skip
> cc -c -o syso/objTestImpl.syso syso/src/objTestImpl.c
FAIL: testdata/script/link_syso_issue33139.txt:15:
unexpected error starting command:
fork/exec /dev/null: permission denied
CC was set to /dev/null (during build) in the scenario mentioned above
This patch replaces [!exec:cc] with [!cgo] because we care about the
availability of the 'cc' builtin and not the 'cc' executable in $PATH
Change-Id: Ifbd2441f5f8e903ca3da213aba76f44c2e2eebab
GitHub-Last-Rev: 3b743787d08502f7a936e800ee7b6909fcf56068
GitHub-Pull-Request: golang/go#43912
Reviewed-on: https://go-review.googlesource.com/c/go/+/286633
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
-rw-r--r-- | src/cmd/go/testdata/script/link_syso_issue33139.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/testdata/script/link_syso_issue33139.txt b/src/cmd/go/testdata/script/link_syso_issue33139.txt index 26034c9626..8a8cb4aa8c 100644 --- a/src/cmd/go/testdata/script/link_syso_issue33139.txt +++ b/src/cmd/go/testdata/script/link_syso_issue33139.txt @@ -2,7 +2,7 @@ # embedded in a package, that is referenced by a Go assembly function. # See issue 33139. [!gc] skip -[!exec:cc] skip +[!cgo] skip # External linking is not supported on linux/ppc64. # See: https://github.com/golang/go/issues/8912 |