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:
parent
562fabcac7
commit
d5967a7100
@ -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)
|
||||
|
11
src/cmd/go/testdata/script/test_no_tests.txt
vendored
Normal file
11
src/cmd/go/testdata/script/test_no_tests.txt
vendored
Normal 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")
|
||||
}
|
5
src/cmd/go/testdata/src/testnorun/p.go
vendored
5
src/cmd/go/testdata/src/testnorun/p.go
vendored
@ -1,5 +0,0 @@
|
||||
package p
|
||||
|
||||
func init() {
|
||||
panic("go test must not link and run test binaries without tests")
|
||||
}
|
Loading…
Reference in New Issue
Block a user