Add support for ewasm evmc vm.

This commit is contained in:
Alexander Arlt
2020-09-08 12:41:42 -05:00
parent 202332405f
commit 23d9b1567e
15 changed files with 512 additions and 234 deletions
+13 -7
View File
@@ -161,6 +161,7 @@ TestTool::Result TestTool::process()
m_test = m_testCaseCreator(TestCase::Config{
m_path.string(),
m_options.evmVersion(),
m_options.vmPaths,
m_options.enforceViaYul
});
if (m_test->shouldRun())
@@ -424,14 +425,19 @@ int main(int argc, char const *argv[])
auto& options = dynamic_cast<solidity::test::IsolTestOptions const&>(solidity::test::CommonOptions::get());
bool disableSemantics = !solidity::test::EVMHost::getVM(options.evmonePath.string());
if (disableSemantics)
bool disableSemantics = true;
try
{
cout << "Unable to find " << solidity::test::evmoneFilename << ". Please provide the path using --evmonepath <path>." << endl;
cout << "You can download it at" << endl;
cout << solidity::test::evmoneDownloadLink << endl;
cout << endl << "--- SKIPPING ALL SEMANTICS TESTS ---" << endl << endl;
disableSemantics = !solidity::test::EVMHost::checkVmPaths(options.vmPaths);
}
catch (std::runtime_error const& _exception)
{
cerr << "Error: " << _exception.what() << endl;
return 1;
}
if (disableSemantics)
cout << endl << "--- SKIPPING ALL SEMANTICS TESTS ---" << endl << endl;
TestStats global_stats{0, 0};
cout << "Running tests..." << endl << endl;
@@ -472,7 +478,7 @@ int main(int argc, char const *argv[])
cout << "." << endl;
if (disableSemantics)
cout << "\nNOTE: Skipped semantics tests because " << solidity::test::evmoneFilename << " could not be found.\n" << endl;
cout << "\nNOTE: Skipped semantics tests because no evmc vm could be found.\n" << endl;
return global_stats ? 0 : 1;
}