Enable the optimizer for test runs.

This commit is contained in:
chriseth
2016-11-23 16:48:13 +01:00
parent a7c2509adf
commit c9293f2f23
7 changed files with 12 additions and 5 deletions
+3
View File
@@ -39,6 +39,9 @@ Options::Options()
ipcPath = suite.argv[i + 1];
i++;
}
else if (string(suite.argv[i]) == "--optimize")
optimize = true;
if (ipcPath.empty())
if (auto path = getenv("ETH_TEST_IPC"))
ipcPath = path;
+1
View File
@@ -106,6 +106,7 @@ namespace test
struct Options: boost::noncopyable
{
std::string ipcPath;
bool optimize = false;
static Options const& get();
-1
View File
@@ -220,7 +220,6 @@ protected:
{
if (!s_compiledRegistrar)
{
m_optimize = true;
m_compiler.reset(false);
m_compiler.addSource("", registrarCode);
ETH_TEST_REQUIRE_NO_THROW(m_compiler.compile(m_optimize, m_optimizeRuns), "Compiling contract failed");
-1
View File
@@ -132,7 +132,6 @@ protected:
{
if (!s_compiledRegistrar)
{
m_optimize = true;
m_compiler.reset(false);
m_compiler.addSource("", registrarCode);
ETH_TEST_REQUIRE_NO_THROW(m_compiler.compile(m_optimize, m_optimizeRuns), "Compiling contract failed");
-1
View File
@@ -447,7 +447,6 @@ protected:
{
if (!s_compiledWallet)
{
m_optimize = true;
m_compiler.reset(false);
m_compiler.addSource("", walletCode);
ETH_TEST_REQUIRE_NO_THROW(m_compiler.compile(m_optimize, m_optimizeRuns), "Compiling contract failed");
@@ -46,6 +46,7 @@ string getIPCSocketPath()
ExecutionFramework::ExecutionFramework() :
m_rpc(RPCSession::instance(getIPCSocketPath())),
m_optimize(dev::test::Options::get().optimize),
m_sender(m_rpc.account(0))
{
m_rpc.test_rewindToBlock(0);