mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove mention of IPC.
This commit is contained in:
parent
ac43c3bd18
commit
c4638cc5cb
@ -44,7 +44,7 @@ struct Testsuite
|
||||
boost::filesystem::path const path;
|
||||
boost::filesystem::path const subpath;
|
||||
bool smt;
|
||||
bool ipc;
|
||||
bool needsVM;
|
||||
TestCase::TestCaseCreator testCaseCreator;
|
||||
};
|
||||
|
||||
@ -52,7 +52,7 @@ struct Testsuite
|
||||
/// Array of testsuits that can be run interactively as well as automatically
|
||||
Testsuite const g_interactiveTestsuites[] = {
|
||||
/*
|
||||
Title Path Subpath SMT IPC Creator function */
|
||||
Title Path Subpath SMT NeedsVM Creator function */
|
||||
{"Yul Optimizer", "libyul", "yulOptimizerTests", false, false, &yul::test::YulOptimizerTest::create},
|
||||
{"Yul Interpreter", "libyul", "yulInterpreterTests", false, false, &yul::test::YulInterpreterTest::create},
|
||||
{"Yul Object Compiler", "libyul", "objectCompiler", false, false, &yul::test::ObjectCompilerTest::create},
|
||||
|
@ -44,7 +44,6 @@ public:
|
||||
struct Config
|
||||
{
|
||||
std::string filename;
|
||||
std::string ipcPath;
|
||||
langutil::EVMVersion evmVersion;
|
||||
};
|
||||
|
||||
|
@ -75,13 +75,12 @@ int registerTests(
|
||||
boost::unit_test::test_suite& _suite,
|
||||
boost::filesystem::path const& _basepath,
|
||||
boost::filesystem::path const& _path,
|
||||
std::string const& _ipcPath,
|
||||
TestCase::TestCaseCreator _testCaseCreator
|
||||
)
|
||||
{
|
||||
int numTestsAdded = 0;
|
||||
fs::path fullpath = _basepath / _path;
|
||||
TestCase::Config config{fullpath.string(), _ipcPath, dev::test::Options::get().evmVersion()};
|
||||
TestCase::Config config{fullpath.string(), dev::test::Options::get().evmVersion()};
|
||||
if (fs::is_directory(fullpath))
|
||||
{
|
||||
test_suite* sub_suite = BOOST_TEST_SUITE(_path.filename().string());
|
||||
@ -90,7 +89,7 @@ int registerTests(
|
||||
fs::directory_iterator()
|
||||
))
|
||||
if (fs::is_directory(entry.path()) || TestCase::isTestFilename(entry.path().filename()))
|
||||
numTestsAdded += registerTests(*sub_suite, _basepath, _path / entry.path().filename(), _ipcPath, _testCaseCreator);
|
||||
numTestsAdded += registerTests(*sub_suite, _basepath, _path / entry.path().filename(), _testCaseCreator);
|
||||
_suite.add(sub_suite);
|
||||
}
|
||||
else
|
||||
@ -141,8 +140,8 @@ test_suite* init_unit_test_suite( int /*argc*/, char* /*argv*/[] )
|
||||
master.p_name.value = "SolidityTests";
|
||||
dev::test::Options::get().validate();
|
||||
|
||||
bool disableIPC = !dev::test::EVMHost::getVM(dev::test::Options::get().evmonePath.string());
|
||||
if (disableIPC)
|
||||
bool disableSemantics = !dev::test::EVMHost::getVM(dev::test::Options::get().evmonePath.string());
|
||||
if (disableSemantics)
|
||||
{
|
||||
cout << "Unable to find libevmone.so. Please provide the path using -- --evmonepath <path>." << endl;
|
||||
cout << "You can download it at" << endl;
|
||||
@ -157,19 +156,18 @@ test_suite* init_unit_test_suite( int /*argc*/, char* /*argv*/[] )
|
||||
if (ts.smt && options.disableSMT)
|
||||
continue;
|
||||
|
||||
if (ts.ipc && disableIPC)
|
||||
if (ts.needsVM && disableSemantics)
|
||||
continue;
|
||||
|
||||
solAssert(registerTests(
|
||||
master,
|
||||
options.testPath / ts.path,
|
||||
ts.subpath,
|
||||
options.evmonePath.string(),
|
||||
ts.testCaseCreator
|
||||
) > 0, std::string("no ") + ts.title + " tests found");
|
||||
}
|
||||
|
||||
if (disableIPC)
|
||||
if (disableSemantics)
|
||||
{
|
||||
for (auto suite: {
|
||||
"ABIDecoderTest",
|
||||
|
@ -36,8 +36,8 @@ using namespace boost::unit_test;
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
|
||||
SemanticTest::SemanticTest(string const& _filename, string const& _ipcPath, langutil::EVMVersion _evmVersion):
|
||||
SolidityExecutionFramework(_ipcPath, _evmVersion)
|
||||
SemanticTest::SemanticTest(string const& _filename, langutil::EVMVersion _evmVersion):
|
||||
SolidityExecutionFramework(_evmVersion)
|
||||
{
|
||||
ifstream file(_filename);
|
||||
soltestAssert(file, "Cannot open test contract: \"" + _filename + "\".");
|
||||
|
@ -44,9 +44,9 @@ class SemanticTest: public SolidityExecutionFramework, public EVMVersionRestrict
|
||||
{
|
||||
public:
|
||||
static std::unique_ptr<TestCase> create(Config const& _options)
|
||||
{ return std::make_unique<SemanticTest>(_options.filename, _options.ipcPath, _options.evmVersion); }
|
||||
{ return std::make_unique<SemanticTest>(_options.filename, _options.evmVersion); }
|
||||
|
||||
explicit SemanticTest(std::string const& _filename, std::string const& _ipcPath, langutil::EVMVersion _evmVersion);
|
||||
explicit SemanticTest(std::string const& _filename, langutil::EVMVersion _evmVersion);
|
||||
|
||||
TestResult run(std::ostream& _stream, std::string const& _linePrefix = "", bool _formatted = false) override;
|
||||
void printSource(std::ostream &_stream, std::string const& _linePrefix = "", bool _formatted = false) const override;
|
||||
|
@ -30,16 +30,6 @@ using namespace dev::solidity;
|
||||
using namespace dev::solidity::test;
|
||||
using namespace std;
|
||||
|
||||
SolidityExecutionFramework::SolidityExecutionFramework():
|
||||
ExecutionFramework()
|
||||
{
|
||||
}
|
||||
|
||||
SolidityExecutionFramework::SolidityExecutionFramework(std::string const&, langutil::EVMVersion _evmVersion):
|
||||
ExecutionFramework(_evmVersion)
|
||||
{
|
||||
}
|
||||
|
||||
bytes SolidityExecutionFramework::compileContract(
|
||||
string const& _sourceCode,
|
||||
string const& _contractName,
|
||||
|
@ -45,8 +45,10 @@ class SolidityExecutionFramework: public dev::test::ExecutionFramework
|
||||
{
|
||||
|
||||
public:
|
||||
SolidityExecutionFramework();
|
||||
SolidityExecutionFramework(std::string const& _ipcPath, langutil::EVMVersion _evmVersion);
|
||||
SolidityExecutionFramework() {}
|
||||
explicit SolidityExecutionFramework(langutil::EVMVersion _evmVersion):
|
||||
ExecutionFramework(_evmVersion)
|
||||
{}
|
||||
|
||||
virtual bytes const& compileAndRunWithoutCheck(
|
||||
std::string const& _sourceCode,
|
||||
|
@ -157,7 +157,7 @@ TestTool::Result TestTool::process()
|
||||
{
|
||||
(AnsiColorized(cout, formatted, {BOLD}) << m_name << ": ").flush();
|
||||
|
||||
m_test = m_testCaseCreator(TestCase::Config{m_path.string(), m_options.evmonePath.string(), m_options.evmVersion()});
|
||||
m_test = m_testCaseCreator(TestCase::Config{m_path.string(), m_options.evmVersion()});
|
||||
if (m_test->validateSettings(m_options.evmVersion()))
|
||||
switch (TestCase::TestResult result = m_test->run(outputMessages, " ", formatted))
|
||||
{
|
||||
@ -430,7 +430,7 @@ int main(int argc, char const *argv[])
|
||||
// Interactive tests are added in InteractiveTests.h
|
||||
for (auto const& ts: g_interactiveTestsuites)
|
||||
{
|
||||
if (ts.ipc && disableSemantics)
|
||||
if (ts.needsVM && disableSemantics)
|
||||
continue;
|
||||
|
||||
if (ts.smt && options.disableSMT)
|
||||
|
Loading…
Reference in New Issue
Block a user