diff options
Diffstat (limited to 'test/libsolidity/SolidityExecutionFramework.cpp')
-rw-r--r-- | test/libsolidity/SolidityExecutionFramework.cpp | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/test/libsolidity/SolidityExecutionFramework.cpp b/test/libsolidity/SolidityExecutionFramework.cpp index da9cf5f1..02548121 100644 --- a/test/libsolidity/SolidityExecutionFramework.cpp +++ b/test/libsolidity/SolidityExecutionFramework.cpp @@ -22,6 +22,7 @@ #include <cstdlib> #include <boost/test/framework.hpp> +#include <libdevcore/CommonIO.h> #include <test/libsolidity/SolidityExecutionFramework.h> using namespace std; @@ -29,26 +30,17 @@ using namespace dev; using namespace dev::solidity; using namespace dev::solidity::test; -string getIPCSocketPath() +namespace // anonymous { - string ipcPath; + h256 const EmptyTrie("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"); +} - size_t argc = boost::unit_test::framework::master_test_suite().argc; - char** argv = boost::unit_test::framework::master_test_suite().argv; - for (size_t i = 0; i < argc; i++) - { - string arg = argv[i]; - if (arg == "--ipc" && i + 1 < argc) - { - ipcPath = argv[i + 1]; - i++; - } - } - if (ipcPath.empty()) - if (auto path = getenv("ETH_TEST_IPC")) - ipcPath = path; +string getIPCSocketPath() +{ + string ipcPath = dev::test::Options::get().ipcPath; if (ipcPath.empty()) - BOOST_FAIL("ERROR: ipcPath not set! (use --ipc <path> or the environment variable ETH_TEST_IPC)"); + BOOST_FAIL("ERROR: ipcPath not set! (use --ipcpath <path> or the environment variable ETH_TEST_IPC)"); + return ipcPath; } @@ -56,9 +48,6 @@ ExecutionFramework::ExecutionFramework() : m_rpc(RPCSession::instance(getIPCSocketPath())), m_sender(m_rpc.account(0)) { - if (g_logVerbosity != -1) - g_logVerbosity = 0; - m_rpc.test_rewindToBlock(0); } |