aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2022-10-27 17:51:04 -0700
committerMichael Matloob <matloob@golang.org>2022-10-28 17:33:10 +0000
commit77296e36457b070bc811a605c4c4bd6c36d972ae (patch)
treeb9467a68eaaf2bbabc64771cb1d39357e6c429e4 /src/testing
parent99862cd57dd9406180f238e8fa2fcc1d435fb163 (diff)
downloadgo-77296e36457b070bc811a605c4c4bd6c36d972ae.tar.xz
cmd/go: don't substitute '$WORK' for work directory in -x heredocs
When writing the set of commands excuted for go build -x, $WORK is substituted for the work directory in all the commnands. But this includes the cat <<EOF commands used to create a file with the given contents. While we can expect the shell to substitute $WORK properly, commands that read input files, such as importcfgs won't do that substitution. This is necessary to fix the build_dash_x script test for CL 432535 because it removes .a files from the traditional stdlib install locations. The test can pass even with importcfg packagefiles in $WORK because all transitive imports are in the stdlib, and the compiler can fall back to finding stdlib .a files in their traditional places, but once they're gone the packagefile paths in $WORK will have paths that contain the string $WORK, and os.Open will fail to open them for reading. And since the fallback is gone the test will fail. For #47257 Change-Id: I5db0066de6ed3ccf97927a78ce0939e3eb14aebe Reviewed-on: https://go-review.googlesource.com/c/go/+/446116 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Michael Matloob <matloob@golang.org>
Diffstat (limited to 'src/testing')
0 files changed, 0 insertions, 0 deletions