From 9da62384eeac37f1709fbb53c57386b5390e72a0 Mon Sep 17 00:00:00 2001 From: chriseth Date: Wed, 10 Oct 2018 16:12:18 +0200 Subject: Combine test path discovery. --- test/Options.cpp | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'test/Options.cpp') diff --git a/test/Options.cpp b/test/Options.cpp index 63588237..da08eb37 100644 --- a/test/Options.cpp +++ b/test/Options.cpp @@ -21,6 +21,8 @@ #include +#include + #include #include @@ -74,25 +76,7 @@ Options::Options() testPath = path; if (testPath.empty()) - { - 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)) - { - testPath = basePath; - break; - } - } - } + testPath = discoverTestPath(); } void Options::validate() const -- cgit