Skip to content

Commit 6ca3acc

Browse files
Bryan C. Millsgopherbot
Bryan C. Mills
authored andcommitted
cmd/go: in TestScript/mod_outside, run 'go build' before checking cmd/addr2line staleness
If the build cache is cleaned (using 'go clean -cache' or similar), or if a toolchain is freshly installed without warming the cache, the build cache might not contain the dependencies needed to verify that cmd/addr2line is not stale. In that case, the test should refill the cache instead of failing. Fixes #56889. Change-Id: Ic6cf13b92bafa9c795e50eb0e4e1a9ae00ee8538 Reviewed-on: https://go-review.googlesource.com/c/go/+/452458 Auto-Submit: Bryan Mills <[email protected]> Run-TryBot: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Russ Cox <[email protected]>
1 parent 86ede17 commit 6ca3acc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ stderr 'needmod[/\\]needmod.go:10:2: no required module provides package example
205205

206206
# 'go install' for a package in GOROOT should succeed.
207207
# (It must be non-stale here so that the test does not write to GOROOT).
208+
go build -o $devnull cmd/addr2line # make sure any necessary dependencies are present in GOCACHE
208209
! stale cmd/addr2line
209210
go install cmd/addr2line
210211
! stderr .

0 commit comments

Comments
 (0)