aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/script_test.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2022-04-08 15:23:14 -0400
committerBryan Mills <bcmills@google.com>2022-04-12 03:13:28 +0000
commite299381cd1b4b7efecf7642ebfcd5e76ffa65e6d (patch)
tree8c9f0c3f6f22c32f0fd34b9427e6ea2b12329d32 /src/cmd/go/script_test.go
parentd4dbad53ca080d767798ee4267999868d7f2c22d (diff)
downloadgo-e299381cd1b4b7efecf7642ebfcd5e76ffa65e6d.tar.gz
go-e299381cd1b4b7efecf7642ebfcd5e76ffa65e6d.zip
cmd/go: fix TestScript/build_trimpath_goroot when built with a mismatched GOROOT_FINAL
Fixes #52236. Updates #51461. Change-Id: Ie91e0256afd45e9bbd60fd8cdc696363027ab696 Reviewed-on: https://go-review.googlesource.com/c/go/+/399156 Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/go/script_test.go')
-rw-r--r--src/cmd/go/script_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go
index 76c542f32a..6254cf97c1 100644
--- a/src/cmd/go/script_test.go
+++ b/src/cmd/go/script_test.go
@@ -175,7 +175,7 @@ func (ts *testScript) setup() {
"GOPROXY=" + proxyURL,
"GOPRIVATE=",
"GOROOT=" + testGOROOT,
- "GOROOT_FINAL=" + os.Getenv("GOROOT_FINAL"), // causes spurious rebuilds and breaks the "stale" built-in if not propagated
+ "GOROOT_FINAL=" + testGOROOT_FINAL, // causes spurious rebuilds and breaks the "stale" built-in if not propagated
"GOTRACEBACK=system",
"TESTGO_GOROOT=" + testGOROOT,
"GOSUMDB=" + testSumDBVerifierKey,
@@ -385,6 +385,8 @@ Script:
}
}
}
+ case "mismatched-goroot":
+ ok = testGOROOT_FINAL != "" && testGOROOT_FINAL != testGOROOT
default:
if strings.HasPrefix(cond.tag, "exec:") {
prog := cond.tag[len("exec:"):]