diff options
author | subtly <subtly@users.noreply.github.com> | 2015-04-05 20:03:25 +0800 |
---|---|---|
committer | subtly <subtly@users.noreply.github.com> | 2015-04-05 20:03:25 +0800 |
commit | 985271d8fcbcc9db185094a45835022aa053fdf4 (patch) | |
tree | 922a60c54969886a037ae5d3cd8e308f5154026f /TestHelper.cpp | |
parent | e03ee60fa4d3b42b84a489032c844ae035c470fe (diff) | |
parent | 158fdc17982c983be686fb928595c30076b7acb7 (diff) | |
download | dexon-solidity-985271d8fcbcc9db185094a45835022aa053fdf4.tar dexon-solidity-985271d8fcbcc9db185094a45835022aa053fdf4.tar.gz dexon-solidity-985271d8fcbcc9db185094a45835022aa053fdf4.tar.bz2 dexon-solidity-985271d8fcbcc9db185094a45835022aa053fdf4.tar.lz dexon-solidity-985271d8fcbcc9db185094a45835022aa053fdf4.tar.xz dexon-solidity-985271d8fcbcc9db185094a45835022aa053fdf4.tar.zst dexon-solidity-985271d8fcbcc9db185094a45835022aa053fdf4.zip |
Merge branch 'develop' into p2p
Diffstat (limited to 'TestHelper.cpp')
-rw-r--r-- | TestHelper.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp index 7dc00149..295b759f 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -29,6 +29,7 @@ #include <libethereum/Client.h> #include <liblll/Compiler.h> #include <libevm/VMFactory.h> +#include "Stats.h" using namespace std; using namespace dev::eth; @@ -431,6 +432,9 @@ void executeTests(const string& _name, const string& _testPathAppendix, std::fun string testPath = getTestPath(); testPath += _testPathAppendix; + if (Options::get().stats) + Listener::registerListener(Stats::get()); + if (Options::get().fillTests) { try @@ -462,6 +466,7 @@ void executeTests(const string& _name, const string& _testPathAppendix, std::fun string s = asString(dev::contents(testPath + "/" + _name + ".json")); BOOST_REQUIRE_MESSAGE(s.length() > 0, "Contents of " + testPath + "/" + _name + ".json is empty. Have you cloned the 'tests' repo branch develop and set ETHEREUM_TEST_PATH to its path?"); json_spirit::read_string(s, v); + Listener::notifySuiteStarted(_name); doTests(v, false); } catch (Exception const& _e) @@ -535,10 +540,12 @@ Options::Options() vmtrace = true; else if (arg == "--filltests") fillTests = true; - else if (arg == "--stats") + else if (arg.compare(0, 7, "--stats") == 0) + { stats = true; - else if (arg == "--stats=full") - stats = statsFull = true; + if (arg.size() > 7) + statsOutFile = arg.substr(8); // skip '=' char + } else if (arg == "--performance") performance = true; else if (arg == "--quadratic") @@ -586,6 +593,12 @@ void Listener::registerListener(Listener& _listener) g_listener = &_listener; } +void Listener::notifySuiteStarted(std::string const& _name) +{ + if (g_listener) + g_listener->suiteStarted(_name); +} + void Listener::notifyTestStarted(std::string const& _name) { if (g_listener) |