diff options
author | Russ Cox <rsc@golang.org> | 2017-10-27 13:30:09 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2017-10-31 13:20:27 +0000 |
commit | 94471f6324d25e2562c9125aeeeb2af6f2a51fd4 (patch) | |
tree | affa17d1b44629b613ee1bf58f587bda13dd3e72 /src/runtime/crash_test.go | |
parent | 6c8418f560f076da570b70ac645df7cdb01db188 (diff) | |
download | go-94471f6324d25e2562c9125aeeeb2af6f2a51fd4.tar.gz go-94471f6324d25e2562c9125aeeeb2af6f2a51fd4.zip |
runtime: shorten tests in all.bash
This cuts 23 seconds from all.bash on my MacBook Pro.
Change-Id: Ibc4d7c01660b9e9ebd088dd55ba993f0d7ec6aa3
Reviewed-on: https://go-review.googlesource.com/73991
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/crash_test.go')
-rw-r--r-- | src/runtime/crash_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/runtime/crash_test.go b/src/runtime/crash_test.go index 80ae4fa63e..54144c01de 100644 --- a/src/runtime/crash_test.go +++ b/src/runtime/crash_test.go @@ -44,6 +44,10 @@ type buildexe struct { } func runTestProg(t *testing.T, binary, name string, env ...string) string { + if *flagQuick { + t.Skip("-quick") + } + testenv.MustHaveGoBuild(t) exe, err := buildTestProg(t, binary) @@ -53,6 +57,9 @@ func runTestProg(t *testing.T, binary, name string, env ...string) string { cmd := testenv.CleanCmdEnv(exec.Command(exe, name)) cmd.Env = append(cmd.Env, env...) + if testing.Short() { + cmd.Env = append(cmd.Env, "RUNTIME_TEST_SHORT=1") + } var b bytes.Buffer cmd.Stdout = &b cmd.Stderr = &b @@ -93,6 +100,10 @@ func runTestProg(t *testing.T, binary, name string, env ...string) string { } func buildTestProg(t *testing.T, binary string, flags ...string) (string, error) { + if *flagQuick { + t.Skip("-quick") + } + checkStaleRuntime(t) testprog.Lock() |