Skip to content

Commit 2cdb2ec

Browse files
committed
cmd/go: convert TestDotDotDotOutsideGOPATH to script framework
Part of converting all tests to script framework to improve test parallelism. Updates #36320 Updates #17751 Change-Id: I2170f427c238e9fe8c029b43b346621d82c5e8fc Reviewed-on: https://go-review.googlesource.com/c/go/+/214388 Reviewed-by: Jay Conrod <[email protected]>
1 parent 3791594 commit 2cdb2ec

File tree

2 files changed

+29
-23
lines changed

2 files changed

+29
-23
lines changed

src/cmd/go/go_test.go

-23
Original file line numberDiff line numberDiff line change
@@ -2404,29 +2404,6 @@ GLOBL ·constants<>(SB),8,$8
24042404
tg.run("build", "p")
24052405
}
24062406

2407-
// Issue 18778.
2408-
func TestDotDotDotOutsideGOPATH(t *testing.T) {
2409-
tg := testgo(t)
2410-
defer tg.cleanup()
2411-
2412-
tg.tempFile("pkgs/a.go", `package x`)
2413-
tg.tempFile("pkgs/a_test.go", `package x_test
2414-
import "testing"
2415-
func TestX(t *testing.T) {}`)
2416-
2417-
tg.tempFile("pkgs/a/a.go", `package a`)
2418-
tg.tempFile("pkgs/a/a_test.go", `package a_test
2419-
import "testing"
2420-
func TestA(t *testing.T) {}`)
2421-
2422-
tg.cd(tg.path("pkgs"))
2423-
tg.run("build", "./...")
2424-
tg.run("test", "./...")
2425-
tg.run("list", "./...")
2426-
tg.grepStdout("pkgs$", "expected package not listed")
2427-
tg.grepStdout("pkgs/a", "expected package not listed")
2428-
}
2429-
24302407
// Issue 18975.
24312408
func TestFFLAGS(t *testing.T) {
24322409
if !canCgo {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Tests issue #18778
2+
3+
cd pkgs
4+
go build ./...
5+
! stdout .
6+
go test ./...
7+
stdout '^ok'
8+
go list ./...
9+
stdout 'pkgs$'
10+
stdout 'pkgs/a'
11+
12+
-- pkgs/a.go --
13+
package x
14+
-- pkgs/a_test.go --
15+
package x_test
16+
17+
import "testing"
18+
19+
func TestX(t *testing.T) {
20+
}
21+
-- pkgs/a/a.go --
22+
package a
23+
-- pkgs/a/a_test.go --
24+
package a_test
25+
26+
import "testing"
27+
28+
func TestA(t *testing.T) {
29+
}

0 commit comments

Comments
 (0)