aboutsummaryrefslogtreecommitdiffstats
path: root/tests/init_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2018-09-29 04:23:47 +0800
committerGitHub <noreply@github.com>2018-09-29 04:23:47 +0800
commit79ca6c7a657f5f6660fb136707edb07951bb3309 (patch)
treebfea93213f5cc1ddba7e00534698ae9bda53664d /tests/init_test.go
parent4d8c7248bda39e43b7d58ba894c26c4562a13c3f (diff)
downloadgo-tangerine-79ca6c7a657f5f6660fb136707edb07951bb3309.tar
go-tangerine-79ca6c7a657f5f6660fb136707edb07951bb3309.tar.gz
go-tangerine-79ca6c7a657f5f6660fb136707edb07951bb3309.tar.bz2
go-tangerine-79ca6c7a657f5f6660fb136707edb07951bb3309.tar.lz
go-tangerine-79ca6c7a657f5f6660fb136707edb07951bb3309.tar.xz
go-tangerine-79ca6c7a657f5f6660fb136707edb07951bb3309.tar.zst
go-tangerine-79ca6c7a657f5f6660fb136707edb07951bb3309.zip
tests: update slow test lists, skip on windows/386 (#17758)
Diffstat (limited to 'tests/init_test.go')
-rw-r--r--tests/init_test.go17
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/init_test.go b/tests/init_test.go
index 90a74448a..053cbd6fc 100644
--- a/tests/init_test.go
+++ b/tests/init_test.go
@@ -25,6 +25,7 @@ import (
"path/filepath"
"reflect"
"regexp"
+ "runtime"
"sort"
"strings"
"testing"
@@ -90,7 +91,7 @@ type testMatcher struct {
configpat []testConfig
failpat []testFailure
skiploadpat []*regexp.Regexp
- skipshortpat []*regexp.Regexp
+ slowpat []*regexp.Regexp
whitelistpat *regexp.Regexp
}
@@ -105,8 +106,8 @@ type testFailure struct {
}
// skipShortMode skips tests matching when the -short flag is used.
-func (tm *testMatcher) skipShortMode(pattern string) {
- tm.skipshortpat = append(tm.skipshortpat, regexp.MustCompile(pattern))
+func (tm *testMatcher) slow(pattern string) {
+ tm.slowpat = append(tm.slowpat, regexp.MustCompile(pattern))
}
// skipLoad skips JSON loading of tests matching the pattern.
@@ -133,11 +134,15 @@ func (tm *testMatcher) config(pattern string, cfg params.ChainConfig) {
// findSkip matches name against test skip patterns.
func (tm *testMatcher) findSkip(name string) (reason string, skipload bool) {
- if testing.Short() {
- for _, re := range tm.skipshortpat {
- if re.MatchString(name) {
+ isWin32 := runtime.GOARCH == "386" && runtime.GOOS == "windows"
+ for _, re := range tm.slowpat {
+ if re.MatchString(name) {
+ if testing.Short() {
return "skipped in -short mode", false
}
+ if isWin32 {
+ return "skipped on 32bit windows", false
+ }
}
}
for _, re := range tm.skiploadpat {