mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Only consider files ending with .sol and not starting with ~ in syntax tests.
This commit is contained in:
1 parent
9e1095608d
commit
e68c19c47b
3 files changed
+13
-2
No files matched your search
@@ -205,6 +205,13 @@ test_case *make_test_case(
|
||||
}
|
||||
#endif
|
||||
|
||||
bool SyntaxTest::isTestFilename(boost::filesystem::path const& _filename)
|
||||
{
|
||||
return _filename.extension().string() == ".sol" &&
|
||||
!boost::starts_with(_filename.string(), "~") &&
|
||||
!boost::starts_with(_filename.string(), ".");
|
||||
}
|
||||
|
||||
int SyntaxTest::registerTests(
|
||||
boost::unit_test::test_suite& _suite,
|
||||
boost::filesystem::path const& _basepath,
|
||||
@@ -220,7 +227,8 @@ int SyntaxTest::registerTests(
|
||||
fs::directory_iterator(fullpath),
|
||||
fs::directory_iterator()
|
||||
))
|
||||
numTestsAdded += registerTests(*sub_suite, _basepath, _path / entry.path().filename());
|
||||
if (fs::is_directory(entry.path()) || isTestFilename(entry.path().filename()))
|
||||
numTestsAdded += registerTests(*sub_suite, _basepath, _path / entry.path().filename());
|
||||
_suite.add(sub_suite);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user