Add isoltest option to ignore OS

This commit is contained in:
Leo Alt
2021-10-01 12:45:36 +02:00
parent 0e7e936fe6
commit d25fb29178
2 changed files with 23 additions and 4 deletions
+15
View File
@@ -66,6 +66,21 @@ SMTCheckerTest::SMTCheckerTest(string const& _filename): SyntaxTest(_filename, E
m_ignoreCex = true;
else
BOOST_THROW_EXCEPTION(runtime_error("Invalid SMT counterexample choice."));
auto const& ignoreOSSetting = m_reader.stringSetting("SMTIgnoreOS", "none");
for (string const& os: ignoreOSSetting | ranges::views::split(',') | ranges::to<vector<string>>())
{
#ifdef __APPLE__
if (os == "macos")
m_shouldRun = false;
#elif _WIN32
if (os == "windows")
m_shouldRun = false;
#elif __linux__
if (os == "linux")
m_shouldRun = false;
#endif
}
}
TestCase::TestResult SMTCheckerTest::run(ostream& _stream, string const& _linePrefix, bool _formatted)