]> Cypherpunks.ru repositories - gostls13.git/commit
internal/testenv: add GOROOT and use it to fix tests broken with -trimpath
authorBryan C. Mills <bcmills@google.com>
Wed, 9 Mar 2022 22:19:23 +0000 (17:19 -0500)
committerBryan Mills <bcmills@google.com>
Fri, 18 Mar 2022 21:55:52 +0000 (21:55 +0000)
commit58631ba54f45506f2f178bb01d22273e7dfba674
tree6833d66fdc88efd536d43d0a71f3e61aec77778e
parent9ac75d39514402d9b314e758524dcc28612b8937
internal/testenv: add GOROOT and use it to fix tests broken with -trimpath

This fixes many (but not all) of the tests that currently fail
(due to a bogus path reported by runtime.GOROOT) when run with
'go test -trimpath std cmd'.

Updates #51461

Change-Id: Ia2cc05705529c4859e7928f32eeceed647f2e986
Reviewed-on: https://go-review.googlesource.com/c/go/+/391806
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
22 files changed:
src/cmd/api/goapi.go
src/cmd/api/goapi_test.go
src/cmd/compile/internal/importer/gcimporter_test.go
src/cmd/compile/internal/syntax/parser_test.go
src/cmd/compile/internal/types2/main_test.go [new file with mode: 0644]
src/cmd/compile/internal/types2/stdlib_test.go
src/cmd/doc/doc_test.go
src/cmd/go/internal/imports/scan_test.go
src/cmd/gofmt/long_test.go
src/cmd/internal/moddeps/moddeps_test.go
src/cmd/link/internal/ld/nooptcgolink_test.go
src/cmd/nm/nm_test.go
src/go/importer/importer_test.go
src/go/internal/gcimporter/gcimporter_test.go
src/go/internal/srcimporter/srcimporter_test.go
src/go/types/main_test.go [new file with mode: 0644]
src/go/types/stdlib_test.go
src/internal/testenv/testenv.go
src/net/netip/inlining_test.go
src/path/filepath/path_test.go
src/runtime/runtime-gdb_test.go
src/time/zoneinfo_test.go