aboutsummaryrefslogtreecommitdiffstats
path: root/TestHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TestHelper.cpp')
-rw-r--r--TestHelper.cpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp
index ddc929e4..128318b8 100644
--- a/TestHelper.cpp
+++ b/TestHelper.cpp
@@ -473,7 +473,7 @@ void executeTests(const string& _name, const string& _testPathAppendix, std::fun
try
{
- cnote << "Testing ..." << _name;
+ std::cout << "TEST " << _name << ":\n";
json_spirit::mValue v;
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?");
@@ -551,6 +551,10 @@ Options::Options()
vmtrace = true;
else if (arg == "--filltests")
fillTests = true;
+ else if (arg == "--stats")
+ stats = true;
+ else if (arg == "--stats=full")
+ stats = statsFull = true;
else if (arg == "--performance")
performance = true;
else if (arg == "--quadratic")
@@ -578,6 +582,7 @@ Options const& Options::get()
return instance;
}
+
LastHashes lastHashes(u256 _currentBlockNumber)
{
LastHashes ret;
@@ -586,4 +591,27 @@ LastHashes lastHashes(u256 _currentBlockNumber)
return ret;
}
+
+namespace
+{
+ Listener* g_listener;
+}
+
+void Listener::registerListener(Listener& _listener)
+{
+ g_listener = &_listener;
+}
+
+void Listener::notifyTestStarted(std::string const& _name)
+{
+ if (g_listener)
+ g_listener->testStarted(_name);
+}
+
+void Listener::notifyTestFinished()
+{
+ if (g_listener)
+ g_listener->testFinished();
+}
+
} } // namespaces