From: Bryan C. Mills Date: Mon, 21 Nov 2022 22:18:07 +0000 (-0500) Subject: cmd/go: in TestScript/mod_outside, run 'go build' before checking cmd/addr2line staleness X-Git-Tag: go1.20rc1~111 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6ca3acc3709426bdc744ef9494314c33361f24bd;p=gostls13.git 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 Run-TryBot: Bryan Mills TryBot-Result: Gopher Robot Reviewed-by: Russ Cox --- diff --git a/src/cmd/go/testdata/script/mod_outside.txt b/src/cmd/go/testdata/script/mod_outside.txt index 65808244e8..ed13e59f36 100644 --- a/src/cmd/go/testdata/script/mod_outside.txt +++ b/src/cmd/go/testdata/script/mod_outside.txt @@ -205,6 +205,7 @@ stderr 'needmod[/\\]needmod.go:10:2: no required module provides package example # 'go install' for a package in GOROOT should succeed. # (It must be non-stale here so that the test does not write to GOROOT). +go build -o $devnull cmd/addr2line # make sure any necessary dependencies are present in GOCACHE ! stale cmd/addr2line go install cmd/addr2line ! stderr .