Closed
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version
)?
1.11
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
linux amd64
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
Ran go test -coverpkg=all ./...
with the following folder structure:
├── foo.go
├── foo_test.go
└── tests
└── tests_test.go
Content of files is irrelevant.
Apparently go test -cover ./...
works, so it's specific to -coverpkg
Also deleting foo_test.go
works
What did you expect to see?
ok _/<HOME>/go/src/foo 0.001s coverage: 0.0% of statements [no tests to run]
ok _/<HOME>/go/src/foo/tests 0.004s coverage: 0.0% of statements [no tests to run]
What did you see instead?
go build _/<HOME>/go/src/foo/tests: no non-test Go files in go/src/foo/tests
FAIL _/<HOME>/go/src/foo [build failed]
ok _/<HOME>/go/src/foo/tests 0.001s coverage: 0.0% of statements in all [no tests to run]