aboutsummaryrefslogtreecommitdiffstats
path: root/test/tools
diff options
context:
space:
mode:
Diffstat (limited to 'test/tools')
-rw-r--r--test/tools/CMakeLists.txt2
-rw-r--r--test/tools/isoltest.cpp25
2 files changed, 5 insertions, 22 deletions
diff --git a/test/tools/CMakeLists.txt b/test/tools/CMakeLists.txt
index d6df0ac8..2f107d39 100644
--- a/test/tools/CMakeLists.txt
+++ b/test/tools/CMakeLists.txt
@@ -1,7 +1,7 @@
add_executable(solfuzzer fuzzer.cpp)
target_link_libraries(solfuzzer PRIVATE libsolc evmasm ${Boost_PROGRAM_OPTIONS_LIBRARIES} ${Boost_SYSTEM_LIBRARIES})
-add_executable(isoltest isoltest.cpp ../Options.cpp ../libsolidity/TestCase.cpp ../libsolidity/SyntaxTest.cpp
+add_executable(isoltest isoltest.cpp ../Options.cpp ../Common.cpp ../libsolidity/TestCase.cpp ../libsolidity/SyntaxTest.cpp
../libsolidity/AnalysisFramework.cpp ../libsolidity/SolidityExecutionFramework.cpp ../ExecutionFramework.cpp
../RPCSession.cpp ../libsolidity/ASTJSONTest.cpp)
target_link_libraries(isoltest PRIVATE libsolc solidity evmasm ${Boost_PROGRAM_OPTIONS_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
diff --git a/test/tools/isoltest.cpp b/test/tools/isoltest.cpp
index 5cf1d9c0..dac87d1c 100644
--- a/test/tools/isoltest.cpp
+++ b/test/tools/isoltest.cpp
@@ -16,6 +16,8 @@
*/
#include <libdevcore/CommonIO.h>
+
+#include <test/Common.h>
#include <test/libsolidity/AnalysisFramework.h>
#include <test/libsolidity/SyntaxTest.h>
#include <test/libsolidity/ASTJSONTest.h>
@@ -47,7 +49,7 @@ struct TestStats
int successCount;
int testCount;
operator bool() const { return successCount == testCount; }
- TestStats& operator+=(TestStats const& _other)
+ TestStats& operator+=(TestStats const& _other) noexcept
{
successCount += _other.successCount;
testCount += _other.testCount;
@@ -285,25 +287,6 @@ void setupTerminal()
#endif
}
-fs::path discoverTestPath()
-{
- auto const searchPath =
- {
- fs::current_path() / ".." / ".." / ".." / "test",
- fs::current_path() / ".." / ".." / "test",
- fs::current_path() / ".." / "test",
- fs::current_path() / "test",
- fs::current_path()
- };
- for (auto const& basePath: searchPath)
- {
- fs::path syntaxTestPath = basePath / "libsolidity" / "syntaxTests";
- if (fs::exists(syntaxTestPath) && fs::is_directory(syntaxTestPath))
- return basePath;
- }
- return {};
-}
-
boost::optional<TestStats> runTestSuite(
string const& _name,
fs::path const& _basePath,
@@ -384,7 +367,7 @@ Allowed options)",
}
if (testPath.empty())
- testPath = discoverTestPath();
+ testPath = dev::test::discoverTestPath();
TestStats global_stats{0, 0};