You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bcmills opened this issue
Jul 20, 2020
· 1 comment
Labels
NeedsFixThe path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.ToolsThis label describes issues relating to any tools in the x/tools repository.
The test for golang.org/x/tools/go/expect fails when run from another module.
A go.mod file was added to the package's testdata directory in CL 216838. However, that cuts off the testdata directory from the rest of the module: there is no special handling for go.mod files in testdata directories (see #27852). The missing testdata directory causes the test to fail when it is run from anywhere other than a clone of the tools repository — notably, including when it is run from the module cache, including as a dependency of any other module.
$ go version
go version devel +0951939f Fri Jul 17 19:09:40 2020 +0000 linux/amd64
$ go test golang.org/x/tools/go/expect
--- FAIL: TestMarker (0.00s)
--- FAIL: TestMarker/testdata/test.go (0.00s)
expect_test.go:57: open testdata/test.go: no such file or directory
--- FAIL: TestMarker/testdata/go.mod (0.00s)
expect_test.go:57: open testdata/go.mod: no such file or directory
FAIL
FAIL golang.org/x/tools/go/expect 0.012s
FAIL
-- go.mod --
module example.com
go 1.15
require golang.org/x/tools v0.0.0-20200720150256-cf97b7f4a4c1 // indirect
The text was updated successfully, but these errors were encountered:
bcmills
added
Testing
An issue that has been verified to require only test changes, not just a test failure.
NeedsFix
The path to resolution is known, but the work has not been done.
labels
Jul 20, 2020
gopherbot
added
the
Tools
This label describes issues relating to any tools in the x/tools repository.
label
Jul 20, 2020
Probably the correct fix for this and for #40310 will be to have go.mod.in files in the testdata directories, and then just write them out to the temporary directories during the actual tests.
NeedsFixThe path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.ToolsThis label describes issues relating to any tools in the x/tools repository.
The test for
golang.org/x/tools/go/expect
fails when run from another module.A
go.mod
file was added to the package'stestdata
directory in CL 216838. However, that cuts off thetestdata
directory from the rest of the module: there is no special handling forgo.mod
files intestdata
directories (see #27852). The missingtestdata
directory causes the test to fail when it is run from anywhere other than a clone of thetools
repository — notably, including when it is run from the module cache, including as a dependency of any other module.CC @stamblerre @ridersofrohan @ianthehat
The text was updated successfully, but these errors were encountered: