Skip to content

Commit

Permalink
go/parser: skip TestParseDepthLimit for short tests
Browse files Browse the repository at this point in the history
Because it requires a not insignificant amount of memory to run. Also
remove the WASM-only skip from TestScopeDepthLimit, which is less
intensive.

Fixes #53816

Change-Id: I8463046510ce4dd3d8f6d66938828d5e6963c3be
Reviewed-on: https://go-review.googlesource.com/c/go/+/417657
Auto-Submit: Roland Shoemaker <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Roland Shoemaker <[email protected]>
  • Loading branch information
rolandshoemaker authored and gopherbot committed Jul 14, 2022
1 parent 783ff7d commit dc00aed
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/go/parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"go/ast"
"go/token"
"io/fs"
"runtime"
"strings"
"testing"
)
Expand Down Expand Up @@ -653,8 +652,8 @@ func split(x string) (pre, mid, post string) {
}

func TestParseDepthLimit(t *testing.T) {
if runtime.GOARCH == "wasm" {
t.Skip("causes call stack exhaustion on js/wasm")
if testing.Short() {
t.Skip("test requires significant memory")
}
for _, tt := range parseDepthTests {
for _, size := range []string{"small", "big"} {
Expand Down Expand Up @@ -699,9 +698,6 @@ func TestParseDepthLimit(t *testing.T) {
}

func TestScopeDepthLimit(t *testing.T) {
if runtime.GOARCH == "wasm" {
t.Skip("causes call stack exhaustion on js/wasm")
}
for _, tt := range parseDepthTests {
if !tt.scope {
continue
Expand Down

0 comments on commit dc00aed

Please sign in to comment.