Skip to content

Commit d5967a7

Browse files
committed
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 <[email protected]> Reviewed-by: Jay Conrod <[email protected]>
1 parent 562fabc commit d5967a7

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

src/cmd/go/go_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5271,16 +5271,6 @@ func TestCDAndGOPATHAreDifferent(t *testing.T) {
52715271
}
52725272
}
52735273

5274-
// Issue 26242.
5275-
func TestGoTestWithoutTests(t *testing.T) {
5276-
tg := testgo(t)
5277-
defer tg.cleanup()
5278-
tg.parallel()
5279-
tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
5280-
tg.run("test", "testnorun")
5281-
tg.grepStdout(`testnorun\t\[no test files\]`, "do not want test to run")
5282-
}
5283-
52845274
// Issue 25579.
52855275
func TestGoBuildDashODevNull(t *testing.T) {
52865276
tooSlow(t)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Tests issue #26242
2+
3+
go test testnorun
4+
stdout 'testnorun\t\[no test files\]'
5+
6+
-- testnorun/p.go --
7+
package p
8+
9+
func init() {
10+
panic("go test must not link and run test binaries without tests")
11+
}

src/cmd/go/testdata/src/testnorun/p.go

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)