]> Cypherpunks repositories - gostls13.git/commit
test: make runindir tests pass regardless of whether module mode is in use
authorBryan C. Mills <bcmills@google.com>
Tue, 24 Mar 2020 20:18:02 +0000 (16:18 -0400)
committerBryan C. Mills <bcmills@google.com>
Wed, 25 Mar 2020 14:19:25 +0000 (14:19 +0000)
commit91b8b130dda2c3a5933baee439e3fed1098e8318
tree202f3c2219efa274408fa5ae1b52c1f9f9363856
parent16cfab8d89ec26a71356c73378ab92eafa6a7356
test: make runindir tests pass regardless of whether module mode is in use

The "runindir" tests used "go run", but relied on relative imports
(which are not supported by "go run" in module mode). Instead, such
tests must use fully-qualified imports, which require either a go.mod
file (in module mode) or that the package be in an appropriate
subdirectory of GOPATH/src (in GOPATH mode).

To set up such a directory, we use yet another copy of the same
overlayDir function currently found in the misc subdirectory of this
repository.

Fixes #33912
Updates #30228

Change-Id: If3d7ea2f7942ba496d98aaaf24a90bcdcf4df9f7
Reviewed-on: https://go-review.googlesource.com/c/go/+/225205
Reviewed-by: Ian Lance Taylor <iant@golang.org>
test/fixedbugs/issue29612.dir/main.go
test/run.go