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>
}
}
-// 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)
--- /dev/null
+# 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")
+}
+++ /dev/null
-package p
-
-func init() {
- panic("go test must not link and run test binaries without tests")
-}