all: skip slow tests in short mode
Updates golang/go#14113
Updates golang/go#11811
Change-Id: I61851de12ff474d3b738fc88f402742677973cae
diff --git a/go/loader/stdlib_test.go b/go/loader/stdlib_test.go
index 812a4a6..46cd8a2 100644
--- a/go/loader/stdlib_test.go
+++ b/go/loader/stdlib_test.go
@@ -32,6 +32,9 @@
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 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 52af485..7cb16d7 100644
--- a/go/pointer/pointer_test.go
+++ b/go/pointer/pointer_test.go
@@ -522,6 +522,9 @@
}
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 1392b40..99c615d 100644
--- a/go/ssa/stdlib_test.go
+++ b/go/ssa/stdlib_test.go
@@ -47,6 +47,9 @@
}
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()