Skip to content

Commit

Permalink
runtime: disable some tests in -quick mode
Browse files Browse the repository at this point in the history
Speeds up the "go test runtime -cpu=1,2,4 -short -quick" phase of all.bash.

For #26473.

Change-Id: I090f5a5aa754462b3253a2156dc31fa67ce7af2a
Reviewed-on: https://go-review.googlesource.com/c/go/+/177399
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
  • Loading branch information
rsc committed May 16, 2019
1 parent dccd5da commit 018d9b4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/runtime/crash_unix_test.go
Expand Up @@ -34,6 +34,10 @@ func init() {
}

func TestCrashDumpsAllThreads(t *testing.T) {
if *flagQuick {
t.Skip("-quick")
}

switch runtime.GOOS {
case "darwin", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "illumos", "solaris":
default:
Expand Down
6 changes: 6 additions & 0 deletions src/runtime/memmove_test.go
Expand Up @@ -15,6 +15,9 @@ import (
)

func TestMemmove(t *testing.T) {
if *flagQuick {
t.Skip("-quick")
}
t.Parallel()
size := 256
if testing.Short() {
Expand Down Expand Up @@ -54,6 +57,9 @@ func TestMemmove(t *testing.T) {
}

func TestMemmoveAlias(t *testing.T) {
if *flagQuick {
t.Skip("-quick")
}
t.Parallel()
size := 256
if testing.Short() {
Expand Down
3 changes: 3 additions & 0 deletions src/runtime/semasleep_test.go
Expand Up @@ -21,6 +21,9 @@ import (
// shouldn't cause semasleep to retry with the same timeout which would
// cause indefinite spinning.
func TestSpuriousWakeupsNeverHangSemasleep(t *testing.T) {
if *flagQuick {
t.Skip("-quick")
}
testenv.MustHaveGoBuild(t)
tempDir, err := ioutil.TempDir("", "issue-27250")
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions src/runtime/stack_test.go
Expand Up @@ -78,6 +78,10 @@ func TestStackMem(t *testing.T) {

// Test stack growing in different contexts.
func TestStackGrowth(t *testing.T) {
if *flagQuick {
t.Skip("-quick")
}

if GOARCH == "wasm" {
t.Skip("fails on wasm (too slow?)")
}
Expand Down

0 comments on commit 018d9b4

Please sign in to comment.