tests: update for blockchain test restructuring

This commit is contained in:
Martin Holst Swende 2019-08-13 13:53:36 +02:00
parent d4173a10b2
commit 46dac70e7a
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0
2 changed files with 20 additions and 16 deletions

View file

@ -25,24 +25,18 @@ func TestBlockchain(t *testing.T) {
bt := new(testMatcher) bt := new(testMatcher)
// General state tests are 'exported' as blockchain tests, but we can run them natively. // General state tests are 'exported' as blockchain tests, but we can run them natively.
bt.skipLoad(`^GeneralStateTests/`) bt.skipLoad(`^ValidBlocks/bcStateTests/`)
// Skip random failures due to selfish mining test. // Skip random failures due to selfish mining test.
bt.skipLoad(`^bcForgedTest/bcForkUncle\.json`) bt.skipLoad(`.*bcForgedTest/bcForkUncle\.json`)
bt.skipLoad(`^bcMultiChainTest/(ChainAtoChainB_blockorder|CallContractFromNotBestBlock)`) bt.skipLoad(`.*bcMultiChainTest/(ChainAtoChainB_blockorder|CallContractFromNotBestBlock)`)
bt.skipLoad(`^bcTotalDifficultyTest/(lotsOfLeafs|lotsOfBranches|sideChainWithMoreTransactions)`) bt.skipLoad(`.*bcTotalDifficultyTest/(lotsOfLeafs|lotsOfBranches|sideChainWithMoreTransactions)`)
// Slow tests // Slow tests
bt.slow(`^bcExploitTest/DelegateCallSpam.json`) bt.slow(`.*bcExploitTest/DelegateCallSpam.json`)
bt.slow(`^bcExploitTest/ShanghaiLove.json`) bt.slow(`.*bcExploitTest/ShanghaiLove.json`)
bt.slow(`^bcExploitTest/SuicideIssue.json`) bt.slow(`.*bcExploitTest/SuicideIssue.json`)
bt.slow(`^bcForkStressTest/`) bt.slow(`.*/bcForkStressTest/`)
bt.slow(`^bcGasPricerTest/RPC_API_Test.json`) bt.slow(`.*/bcGasPricerTest/RPC_API_Test.json`)
bt.slow(`^bcWalletTest/`) bt.slow(`.*/bcWalletTest/`)
// Still failing tests that we need to look into
//bt.fails(`^bcStateTests/suicideThenCheckBalance.json/suicideThenCheckBalance_Constantinople`, "TODO: investigate")
//bt.fails(`^bcStateTests/suicideStorageCheckVCreate2.json/suicideStorageCheckVCreate2_Constantinople`, "TODO: investigate")
//bt.fails(`^bcStateTests/suicideStorageCheckVCreate.json/suicideStorageCheckVCreate_Constantinople`, "TODO: investigate")
//bt.fails(`^bcStateTests/suicideStorageCheck.json/suicideStorageCheck_Constantinople`, "TODO: investigate")
bt.walk(t, blockTestDir, func(t *testing.T, name string, test *BlockTest) { bt.walk(t, blockTestDir, func(t *testing.T, name string, test *BlockTest) {
if err := bt.checkFailure(t, name, test.Run()); err != nil { if err := bt.checkFailure(t, name, test.Run()); err != nil {

View file

@ -107,6 +107,16 @@ var Forks = map[string]*params.ChainConfig{
ByzantiumBlock: big.NewInt(0), ByzantiumBlock: big.NewInt(0),
ConstantinopleBlock: big.NewInt(5), ConstantinopleBlock: big.NewInt(5),
}, },
"ByzantiumToConstantinopleFixAt5": {
ChainID: big.NewInt(1),
HomesteadBlock: big.NewInt(0),
EIP150Block: big.NewInt(0),
EIP155Block: big.NewInt(0),
EIP158Block: big.NewInt(0),
ByzantiumBlock: big.NewInt(0),
ConstantinopleBlock: big.NewInt(5),
PetersburgBlock: big.NewInt(5),
},
} }
// UnsupportedForkError is returned when a test requests a fork that isn't implemented. // UnsupportedForkError is returned when a test requests a fork that isn't implemented.