Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #5885 from ethereum/testupdate
Browse files Browse the repository at this point in the history
update tests (retesteth generated + geth)
  • Loading branch information
gumb0 committed Feb 4, 2020
2 parents 2fe1bec + 4bcd3b8 commit a3b9320
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [1.9.0] - Unreleased

- Added: [#5868](https://github.com/ethereum/aleth/pull/5868) `test_importRawBlock` RPC method reports the detailed reason when import fails.
- Removed: [#5885](https://github.com/ethereum/aleth/pull/5885) Discontinue `testeth --filltests` support for BlockchainTests, TransitionTests, BCGeneralStateTests.

## [1.8.0] - 2019-12-16

Expand Down
2 changes: 1 addition & 1 deletion test/jsontests
Submodule jsontests updated 507 files
18 changes: 3 additions & 15 deletions test/tools/jsontests/BlockChainTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,22 +1049,10 @@ void checkBlocks(TestBlock const& _blockFromFields, TestBlock const& _blockFromR
}
}

class bcTransitionFixture {
public:
bcTransitionFixture()
{
test::TransitionTestsSuite suite;
string const casename = boost::unit_test::framework::current_test_case().p_name;
boost::filesystem::path suiteFillerPath = suite.getFullPathFiller(casename).parent_path();
suite.runAllTestsInFolder(casename);
test::TestOutputHelper::get().markTestFolderAsFinished(suiteFillerPath, casename);
}
};

BOOST_AUTO_TEST_SUITE(BlockchainTests)

// Tests that contain only valid blocks and check that import is correct
BOOST_FIXTURE_TEST_SUITE(ValidBlocks, bcTestFixture<test::BlockchainValidTestSuite>)
BOOST_FIXTURE_TEST_SUITE(ValidBlocks, bcTestFixtureNotRefillable<test::BlockchainValidTestSuite>)
BOOST_AUTO_TEST_CASE(bcBlockGasLimitTest) {}
BOOST_AUTO_TEST_CASE(bcExploitTest) {}
BOOST_AUTO_TEST_CASE(bcForkStressTest) {}
Expand All @@ -1080,7 +1068,7 @@ BOOST_AUTO_TEST_CASE(bcWalletTest) {}
BOOST_AUTO_TEST_SUITE_END()

// Tests that might have invalid blocks and check that those are rejected
BOOST_FIXTURE_TEST_SUITE(InvalidBlocks, bcTestFixture<test::BlockchainInvalidTestSuite>)
BOOST_FIXTURE_TEST_SUITE(InvalidBlocks, bcTestFixtureNotRefillable<test::BlockchainInvalidTestSuite>)
BOOST_AUTO_TEST_CASE(bcBlockGasLimitTest) {}
BOOST_AUTO_TEST_CASE(bcForgedTest) {}
BOOST_AUTO_TEST_CASE(bcInvalidHeaderTest) {}
Expand All @@ -1091,7 +1079,7 @@ BOOST_AUTO_TEST_CASE(bcUncleTest) {}
BOOST_AUTO_TEST_SUITE_END()

// Transition from fork to fork tests
BOOST_FIXTURE_TEST_SUITE(TransitionTests, bcTransitionFixture)
BOOST_FIXTURE_TEST_SUITE(TransitionTests, bcTestFixtureNotRefillable<test::TransitionTestsSuite>)
BOOST_AUTO_TEST_CASE(bcByzantiumToConstantinopleFix) {}
BOOST_AUTO_TEST_CASE(bcEIP158ToByzantium) {}
BOOST_AUTO_TEST_CASE(bcFrontierToHomestead) {}
Expand Down
13 changes: 11 additions & 2 deletions test/tools/jsontests/BlockChainTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,16 @@ class BCGeneralStateTestsSuite : public BlockchainValidTestSuite
class bcGeneralTestsFixture : public StateTestFixtureBase<BCGeneralStateTestsSuite>
{
public:
bcGeneralTestsFixture() : StateTestFixtureBase({TestExecution::RequireOptionAll}) {}
bcGeneralTestsFixture()
: StateTestFixtureBase({TestExecution::RequireOptionAll, TestExecution::NotRefillable})
{}
};

template <class T>
class bcTestFixture
{
public:
bcTestFixture(std::set<TestExecution> const& _execFlags = {})
bcTestFixture(std::set<TestExecution> const& _execFlags)
{
T suite;
if (_execFlags.count(TestExecution::NotRefillable) &&
Expand All @@ -71,6 +73,13 @@ class bcTestFixture
}
};

template <class T>
class bcTestFixtureNotRefillable : public bcTestFixture<T>
{
public:
bcTestFixtureNotRefillable() : bcTestFixture<T>({TestExecution::NotRefillable}) {}
};

class TransitionTestsSuite: public TestSuite
{
json_spirit::mValue doTests(json_spirit::mValue const& _input, bool _fillin) const override;
Expand Down

0 comments on commit a3b9320

Please sign in to comment.