aboutsummaryrefslogtreecommitdiffstats
path: root/test/Options.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-10 22:12:18 +0800
committerchriseth <chris@ethereum.org>2018-10-11 21:01:43 +0800
commit9da62384eeac37f1709fbb53c57386b5390e72a0 (patch)
tree471f7111974f8d6eb5a85825fce2952e7e999128 /test/Options.cpp
parent50247dc8d1f1b3f4408670ab0538da8f0e113cf6 (diff)
downloaddexon-solidity-9da62384eeac37f1709fbb53c57386b5390e72a0.tar
dexon-solidity-9da62384eeac37f1709fbb53c57386b5390e72a0.tar.gz
dexon-solidity-9da62384eeac37f1709fbb53c57386b5390e72a0.tar.bz2
dexon-solidity-9da62384eeac37f1709fbb53c57386b5390e72a0.tar.lz
dexon-solidity-9da62384eeac37f1709fbb53c57386b5390e72a0.tar.xz
dexon-solidity-9da62384eeac37f1709fbb53c57386b5390e72a0.tar.zst
dexon-solidity-9da62384eeac37f1709fbb53c57386b5390e72a0.zip
Combine test path discovery.
Diffstat (limited to 'test/Options.cpp')
-rw-r--r--test/Options.cpp22
1 files changed, 3 insertions, 19 deletions
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 <test/Options.h>
+#include <test/Common.h>
+
#include <libsolidity/interface/EVMVersion.h>
#include <libsolidity/interface/Exceptions.h>
@@ -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