-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
GoCommandcmd/gocmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
I was editing cmd/go/testdata/mod_test.txt
for #26722, and saw an unexpected (cached)
test result.
I run tests pretty aggressively while editing, so I suspect that I saved the file while a previous test run was in progress. We appear to have cached the result based on the contents of the testdata
directory after the run completed, not the contents at the start of the run.
~/go/src$ go test cmd/go -run=TestScript
ok cmd/go (cached)
~/go/src$ GODEBUG=gocacheverify=1 go test cmd/go -run=TestScript
go test proxy starting
go test proxy running at GOPROXY=http://127.0.0.1:38657/mod
go proxy: no archive w.1 v1.2.0
go proxy: no archive x.1 v1.0.0
go proxy: no archive z.1 v1.2.0
go proxy: no archive golang.org/x/text/language 14c0d48
go proxy: no archive golang.org/x/text/language 14c0d48
go proxy: no archive golang.org/x/text/language 14c0d48
go proxy: no archive golang.org/x/text/foo 14c0d48
go proxy: no archive sub.1 v1.0.0
go proxy: no archive badsub.1 v1.0.0
go proxy: no archive versioned.1 v1.0.0
go proxy: no archive versioned.1 v1.1.0
--- FAIL: TestScript (0.00s)
--- FAIL: TestScript/mod_test (1.28s)
script_test.go:150:
# A test in the module's root package should work. (1.107s)
# A test with the "_test" suffix in the module root should also work. (0.171s)
> cd ../b/
$WORK/gopath/src/b
> go test
[stderr]
build github.com/user/b_test: cannot find module for path github.com/user/b_test
[exit status 1]
FAIL: testdata/script/mod_test.txt:10: unexpected command failure
FAIL
FAIL cmd/go 9.231s
~/go/src$ go test cmd/go -run=TestScript
ok cmd/go (cached)
~/go/src$ go version
go version devel +fc1a18c452 Fri Aug 3 11:36:32 2018 -0400 linux/amd64
Metadata
Metadata
Assignees
Labels
GoCommandcmd/gocmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.