all: skip slow tests in short mode

Updates golang/go#14113
Updates golang/go#11811

Change-Id: I61851de12ff474d3b738fc88f402742677973cae
This commit is contained in:
Brad Fitzpatrick 2016-01-28 00:09:23 +00:00
parent 09dc3ef4c7
commit 03f58a3ccf
3 changed files with 12 additions and 0 deletions

View File

@ -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).

View File

@ -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()

View File

@ -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()