tests: update slow test lists, skip on windows/386 (#17758)

This commit is contained in:
Felix Lange 2018-09-28 22:23:47 +02:00 committed by GitHub
parent 4d8c7248bd
commit 79ca6c7a65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 15 deletions

View File

@ -32,9 +32,13 @@ func TestBlockchain(t *testing.T) {
bt.skipLoad(`^bcTotalDifficultyTest/(lotsOfLeafs|lotsOfBranches|sideChainWithMoreTransactions)`)
// This test is broken
bt.fails(`blockhashNonConstArg_Constantinople`, "Broken test")
// Still failing tests
// bt.skipLoad(`^bcWalletTest.*_Byzantium$`)
// Slow tests
bt.slow(`^bcExploitTest/DelegateCallSpam.json`)
bt.slow(`^bcExploitTest/ShanghaiLove.json`)
bt.slow(`^bcExploitTest/SuicideIssue.json`)
bt.slow(`^bcForkStressTest/`)
bt.slow(`^bcGasPricerTest/RPC_API_Test.json`)
bt.slow(`^bcWalletTest/`)
bt.walk(t, blockTestDir, func(t *testing.T, name string, test *BlockTest) {
if err := bt.checkFailure(t, name, test.Run()); err != nil {

View File

@ -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 {
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 {

View File

@ -30,7 +30,15 @@ func TestState(t *testing.T) {
st := new(testMatcher)
// Long tests:
st.skipShortMode(`^stQuadraticComplexityTest/`)
st.slow(`^stAttackTest/ContractCreationSpam`)
st.slow(`^stBadOpcode/badOpcodes`)
st.slow(`^stPreCompiledContracts/modexp`)
st.slow(`^stQuadraticComplexityTest/`)
st.slow(`^stStaticCall/static_Call50000`)
st.slow(`^stStaticCall/static_Return50000`)
st.slow(`^stStaticCall/static_Call1MB`)
st.slow(`^stSystemOperationsTest/CallRecursiveBomb`)
st.slow(`^stTransactionTest/Opcodes_TransactionInit`)
// Broken tests:
st.skipLoad(`^stTransactionTest/OverflowGasRequire\.json`) // gasLimit > 256 bits
st.skipLoad(`^stTransactionTest/zeroSigTransa[^/]*\.json`) // EIP-86 is not supported yet

View File

@ -25,13 +25,9 @@ import (
func TestVM(t *testing.T) {
t.Parallel()
vmt := new(testMatcher)
vmt.slow("^vmPerformance")
vmt.fails("^vmSystemOperationsTest.json/createNameRegistrator$", "fails without parallel execution")
vmt.skipLoad(`^vmInputLimits(Light)?.json`) // log format broken
vmt.skipShortMode("^vmPerformanceTest.json")
vmt.skipShortMode("^vmInputLimits(Light)?.json")
vmt.walk(t, vmTestDir, func(t *testing.T, name string, test *VMTest) {
withTrace(t, test.json.Exec.GasLimit, func(vmconfig vm.Config) error {
return vmt.checkFailure(t, name, test.Run(vmconfig))