Skip to content

Commit 77e76c4

Browse files
Bryan C. Millsgopherbot
Bryan C. Mills
authored andcommitted
cmd/go: unset CC when we remove it from PATH in TestScript/cgo_stale_precompiled
Otherwise, if make.bash produced a relative default CC path but the user has an absolute path to CC set in their environment, the test will fail spuriously. For #64423. Change-Id: I0f3e1d04851585e1b39266badcda9f17489332d9 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/go/+/547997 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Matloob <[email protected]> Auto-Submit: Bryan Mills <[email protected]>
1 parent b11d19e commit 77e76c4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/cmd/go/testdata/script/cgo_stale_precompiled.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@ env GOROOT_FINAL=$oldGOROOT_FINAL
2929
# no longer installed anyway! Since we're requiring a C compiler in order to
3030
# build and use cgo libraries in the standard library, we should make sure it
3131
# matches what's in the cache.
32-
[!abscc] env CGO_ENABLED=1
33-
[!abscc] [!GOOS:plan9] env PATH='' # Guaranteed not to include $(go env CC)!
34-
[!abscc] [GOOS:plan9] env path=''
35-
[!abscc] ! go build -x runtime/cgo
36-
[!abscc] stderr 'C compiler .* not found'
32+
33+
[abscc] stop
34+
35+
env CGO_ENABLED=1
36+
env CC=''
37+
[!GOOS:plan9] env PATH='' # Guaranteed not to include $(go env CC)!
38+
[GOOS:plan9] env path=''
39+
! go build -x runtime/cgo
40+
stderr 'C compiler .* not found'

0 commit comments

Comments
 (0)