Skip to content

Commit

Permalink
all: skip slow tests in short mode
Browse files Browse the repository at this point in the history
Updates golang/go#14113
Updates golang/go#11811

Change-Id: I61851de12ff474d3b738fc88f402742677973cae
  • Loading branch information
bradfitz committed Jan 28, 2016
1 parent 09dc3ef commit 03f58a3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions go/loader/stdlib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ func TestStdlib(t *testing.T) {
if runtime.GOOS == "android" {
t.Skipf("incomplete std lib on %s", runtime.GOOS)
}
if testing.Short() {
t.Skip("skipping in short mode; uses tons of memory (golang.org/issue/14113)")
}

runtime.GC()
t0 := time.Now()
Expand Down Expand Up @@ -118,6 +121,9 @@ func TestStdlib(t *testing.T) {
}

func TestCgoOption(t *testing.T) {
if testing.Short() {
t.Skip("skipping in short mode; uses tons of memory (golang.org/issue/14113)")
}
switch runtime.GOOS {
// On these systems, the net and os/user packages don't use cgo
// or the std library is incomplete (Android).
Expand Down
3 changes: 3 additions & 0 deletions go/pointer/pointer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,9 @@ func checkWarningExpectation(prog *ssa.Program, e *expectation, warnings []point
}

func TestInput(t *testing.T) {
if testing.Short() {
t.Skip("skipping in short mode; this test requires tons of memory; golang.org/issue/14113")
}
ok := true

wd, err := os.Getwd()
Expand Down
3 changes: 3 additions & 0 deletions go/ssa/stdlib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ func bytesAllocated() uint64 {
}

func TestStdlib(t *testing.T) {
if testing.Short() {
t.Skip("skipping in short mode; too slow (golang.org/issue/14113)")
}
// Load, parse and type-check the program.
t0 := time.Now()
alloc0 := bytesAllocated()
Expand Down

0 comments on commit 03f58a3

Please sign in to comment.