1
0
mirror of https://github.com/golang/go synced 2024-09-30 05:34:35 -06:00

cmd/go: convert TestGoTestWithoutTests to the script framework

Part of converting all tests to script framework to improve
test parallelism.

Updates #36320
Updates #17751

Change-Id: Ibc3cb3823bd1c1b80058076f2c9933dc729447a5
Reviewed-on: https://go-review.googlesource.com/c/go/+/213127
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
This commit is contained in:
Michael Matloob 2020-01-02 15:39:28 -05:00
parent 562fabcac7
commit d5967a7100
3 changed files with 11 additions and 15 deletions

View File

@ -5271,16 +5271,6 @@ func TestCDAndGOPATHAreDifferent(t *testing.T) {
}
}
// Issue 26242.
func TestGoTestWithoutTests(t *testing.T) {
tg := testgo(t)
defer tg.cleanup()
tg.parallel()
tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
tg.run("test", "testnorun")
tg.grepStdout(`testnorun\t\[no test files\]`, "do not want test to run")
}
// Issue 25579.
func TestGoBuildDashODevNull(t *testing.T) {
tooSlow(t)

View File

@ -0,0 +1,11 @@
# Tests issue #26242
go test testnorun
stdout 'testnorun\t\[no test files\]'
-- testnorun/p.go --
package p
func init() {
panic("go test must not link and run test binaries without tests")
}

View File

@ -1,5 +0,0 @@
package p
func init() {
panic("go test must not link and run test binaries without tests")
}