Skip to content

Commit bec91ce

Browse files
committed
cmd/go: convert TestPackageNotStaleWithTrailingSlash to script framework
Part of converting all tests to script framework to improve test parallelism. Updates #36320 Updates #17751 Change-Id: I1020feaa4ddb40ff52c46728bc4973cea4c7b066 Reviewed-on: https://go-review.googlesource.com/c/go/+/214391 Reviewed-by: Jay Conrod <jayconrod@google.com>
1 parent 2c859ea commit bec91ce

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

src/cmd/go/go_test.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,25 +1151,6 @@ func TestPackageMainTestCompilerFlags(t *testing.T) {
11511151
tg.grepStderr(`([\\/]compile|gccgo).* (-p p1|-fgo-pkgpath=p1).*p1\.go`, "should have run compile -p p1 p1.go")
11521152
}
11531153

1154-
// Issue 12690
1155-
func TestPackageNotStaleWithTrailingSlash(t *testing.T) {
1156-
skipIfGccgo(t, "gccgo does not have GOROOT")
1157-
tg := testgo(t)
1158-
defer tg.cleanup()
1159-
1160-
// Make sure the packages below are not stale.
1161-
tg.wantNotStale("runtime", "", "must be non-stale before test runs")
1162-
tg.wantNotStale("os", "", "must be non-stale before test runs")
1163-
tg.wantNotStale("io", "", "must be non-stale before test runs")
1164-
1165-
goroot := runtime.GOROOT()
1166-
tg.setenv("GOROOT", goroot+"/")
1167-
1168-
tg.wantNotStale("runtime", "", "with trailing slash in GOROOT, runtime listed as stale")
1169-
tg.wantNotStale("os", "", "with trailing slash in GOROOT, os listed as stale")
1170-
tg.wantNotStale("io", "", "with trailing slash in GOROOT, io listed as stale")
1171-
}
1172-
11731154
// Issue 4104.
11741155
func TestGoTestWithPackageListedMultipleTimes(t *testing.T) {
11751156
tooSlow(t)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Tests Issue #12690
2+
3+
[gccgo] skip 'gccgo does not have GOROOT'
4+
5+
! stale runtime
6+
! stale os
7+
! stale io
8+
9+
env GOROOT=$GOROOT'/'
10+
11+
! stale runtime
12+
! stale os
13+
! stale io

0 commit comments

Comments
 (0)