]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go: fix tests for new builder environment
authorHeschi Kreinick <heschi@google.com>
Wed, 29 Mar 2023 17:13:19 +0000 (13:13 -0400)
committerHeschi Kreinick <heschi@google.com>
Thu, 6 Apr 2023 17:53:14 +0000 (17:53 +0000)
commit4526fa790eb45c7f581e2420ce47763575985dfc
treeaaed55ff6d6f8779ee2d5fc34314676f08b274dd
parentbe50055eef0f460695adb8db2b130392dc367fe7
cmd/go: fix tests for new builder environment

Fix two long tests that fail in the builders we're trying out:

- TestQueryImport was failing with:
  open /nonexist-gopath/pkg/sumdb/sum.golang.org/latest: no such file or directory
  which eventually turns out to be because it couldn't create
  /nonexist-gopath because it wasn't running as root. The test already
  uses a temporary GOPATH, but missed overriding a configuration
  variable set at init time.
- test_flags fails if the working directory has /x/ in it, which it now
  happens to.

Change-Id: Ideef0f318157b42987539e3a20f9fba6a3d3bdd0
Reviewed-on: https://go-review.googlesource.com/c/go/+/480255
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/go/internal/modload/query_test.go
src/cmd/go/testdata/script/test_flags.txt