Do not run reasoning test if no SMT Solver is available.

This commit is contained in:
chriseth 2020-09-17 13:43:18 +02:00
parent ccc6106c7c
commit 6e4205e445

View File

@ -103,7 +103,10 @@ YulOptimizerTest::YulOptimizerTest(string const& _filename):
BOOST_THROW_EXCEPTION(runtime_error("Filename path has to contain a directory: \"" + _filename + "\"."));
m_optimizerStep = std::prev(std::prev(path.end()))->string();
if (m_optimizerStep == "reasoningBasedSimplifier" && solidity::test::CommonOptions::get().disableSMT)
if (m_optimizerStep == "reasoningBasedSimplifier" && (
solidity::test::CommonOptions::get().disableSMT ||
ReasoningBasedSimplifier::invalidInCurrentEnvironment()
))
m_shouldRun = false;
m_source = m_reader.source();