From 2fd075ed02e0c37a80abd41cb6c2ce8b555350e1 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 28 Jan 2016 00:09:23 +0000 Subject: [PATCH] all: skip slow tests in short mode Updates golang/go#14113 Updates golang/go#11811 Change-Id: I61851de12ff474d3b738fc88f402742677973cae Reviewed-on: https://go-review.googlesource.com/18992 Reviewed-by: Robert Griesemer --- go/loader/stdlib_test.go | 6 ++++++ go/pointer/pointer_test.go | 3 +++ go/ssa/stdlib_test.go | 3 +++ 3 files changed, 12 insertions(+) diff --git a/go/loader/stdlib_test.go b/go/loader/stdlib_test.go index 812a4a69269..46cd8a2f74c 100644 --- a/go/loader/stdlib_test.go +++ b/go/loader/stdlib_test.go @@ -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() @@ -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). diff --git a/go/pointer/pointer_test.go b/go/pointer/pointer_test.go index 52af485bd29..7cb16d75c48 100644 --- a/go/pointer/pointer_test.go +++ b/go/pointer/pointer_test.go @@ -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() diff --git a/go/ssa/stdlib_test.go b/go/ssa/stdlib_test.go index 1392b40ca88..99c615d45e8 100644 --- a/go/ssa/stdlib_test.go +++ b/go/ssa/stdlib_test.go @@ -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()