aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Shoemaker <roland@golang.org>2022-07-14 13:00:05 -0700
committerGopher Robot <gobot@golang.org>2022-07-14 21:16:23 +0000
commitdc00aed6de101700fd02b30f93789b9e9e1fe9a1 (patch)
treef24856a5a249c69c7e3b8fdf40cc1774b6739749
parent783ff7dfc49d207114bb80e565e50ea6ff079326 (diff)
downloadgo-dc00aed6de101700fd02b30f93789b9e9e1fe9a1.tar.gz
go-dc00aed6de101700fd02b30f93789b9e9e1fe9a1.zip
go/parser: skip TestParseDepthLimit for short tests
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 <roland@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Roland Shoemaker <roland@golang.org>
-rw-r--r--src/go/parser/parser_test.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/go/parser/parser_test.go b/src/go/parser/parser_test.go
index 1a46c87866..0c278924c9 100644
--- a/src/go/parser/parser_test.go
+++ b/src/go/parser/parser_test.go
@@ -10,7 +10,6 @@ import (
"go/ast"
"go/token"
"io/fs"
- "runtime"
"strings"
"testing"
)
@@ -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"} {
@@ -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