From 0a84827669c12d655d958073889957b95a156783 Mon Sep 17 00:00:00 2001 From: winsvega Date: Tue, 5 May 2015 16:46:01 +0300 Subject: [PATCH] Specifing concrete test when filling testsuite --- test/TestHelper.cpp | 6 ++++++ test/TestHelper.h | 2 ++ test/libethereum/state.cpp | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/test/TestHelper.cpp b/test/TestHelper.cpp index eecf6f80d..9e997c495 100644 --- a/test/TestHelper.cpp +++ b/test/TestHelper.cpp @@ -741,6 +741,12 @@ Options::Options() inputLimits = true; bigData = true; } + else if (arg.compare(0, 12, "--singletest") == 0) + { + singletest = true; + if (arg.size() > 12) + singletestName = arg.substr(13); // skip '=' char + } } } diff --git a/test/TestHelper.h b/test/TestHelper.h index 10e76aa96..6d234abea 100644 --- a/test/TestHelper.h +++ b/test/TestHelper.h @@ -188,6 +188,8 @@ public: /// Test selection /// @{ + bool singletest = false; + std::string singletestName; bool performance = false; bool quadratic = false; bool memory = false; diff --git a/test/libethereum/state.cpp b/test/libethereum/state.cpp index 900f3060f..78334fcd1 100644 --- a/test/libethereum/state.cpp +++ b/test/libethereum/state.cpp @@ -43,6 +43,10 @@ void doStateTests(json_spirit::mValue& v, bool _fillin) { for (auto& i: v.get_obj()) { + if (test::Options::get().singletest == true) + if (test::Options::get().singletestName != i.first) + continue; + std::cout << " " << i.first << "\n"; mObject& o = i.second.get_obj();