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

Commit

Permalink
enable more tests in testeth by default
Browse files Browse the repository at this point in the history
  • Loading branch information
winsvega committed Sep 6, 2019
1 parent e4af4ac commit 2448ee4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
17 changes: 15 additions & 2 deletions test/tools/jsontests/LegacyTestsBoost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,24 @@ template <class T>
class LegacyTestFixtureBase
{
public:
LegacyTestFixtureBase()
LegacyTestFixtureBase(bool _onlyRunIfOptionsAllSet)
{
T suite;
if (Options::get().fillchain || Options::get().filltests)
BOOST_FAIL("Legacy tests are sealed and not refillable!");

string casename = boost::unit_test::framework::current_test_case().p_name;
boost::filesystem::path suiteFillerPath = suite.getFullPathFiller(casename).parent_path();
if (!test::Options::get().all)
static vector<string> const timeConsumingTestSuites{
string{"stTimeConsuming"}, string{"stQuadraticComplexityTest"}};

bool skipTheTest = false;
if (test::inArray(timeConsumingTestSuites, casename) && !test::Options::get().all)
skipTheTest = true;
if (_onlyRunIfOptionsAllSet && !Options::get().all)
skipTheTest = true;

if (skipTheTest)
{
std::cout << "Skipping " << casename << " because --all option is not specified.\n";
test::TestOutputHelper::get().markTestFolderAsFinished(suiteFillerPath, casename);
Expand All @@ -53,11 +62,15 @@ class LegacyTestFixtureBase
class LegacyConstantinopleGeneralStateTestFixture
: public LegacyTestFixtureBase<StateTestSuiteLegacyConstantinople>
{
public:
LegacyConstantinopleGeneralStateTestFixture() : LegacyTestFixtureBase(false) {}
};

class LegacyConstantinopleBCGeneralStateTestFixture
: public LegacyTestFixtureBase<BCGeneralStateTestsSuiteLegacyConstantinople>
{
public:
LegacyConstantinopleBCGeneralStateTestFixture() : LegacyTestFixtureBase(true) {}
};


Expand Down
20 changes: 2 additions & 18 deletions test/tools/libtesteth/TestHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,25 +151,9 @@ eth::Network stringToNetId(string const& _netname)
return eth::Network::FrontierTest;
}

bool isDisabledNetwork(eth::Network _net)
bool isDisabledNetwork(eth::Network)
{
Options const& opt = Options::get();
if (opt.all || opt.filltests || opt.createRandomTest || !opt.singleTestNet.empty())
{
return false;
}
switch (_net)
{
case eth::Network::FrontierTest:
case eth::Network::HomesteadTest:
case eth::Network::FrontierToHomesteadAt5:
case eth::Network::HomesteadToDaoAt5:
case eth::Network::HomesteadToEIP150At5:
case eth::Network::ConstantinopleTest: // Disable initial constantinople version
return true;
default:
break;
}
// Do not disable any networks when running tests
return false;
}

Expand Down

0 comments on commit 2448ee4

Please sign in to comment.