Skip to content

Commit

Permalink
Ignore hidden files in testfiles dir
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinMeimar committed Jun 17, 2024
1 parent a30553a commit eab3805
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/testharness/TestHarness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,12 @@ void TestHarness::findTests() {
}

for (const auto& dir : fs::directory_iterator(testDirPath)) {
if (!fs::is_directory(dir)) {

if (dir.is_regular_file() && dir.path().filename().string()[0] == '.') {
// skip hidden files like .gitkeep
continue;
} else if (!fs::is_directory(dir)) {
// all other files should be directories
throw std::runtime_error("All top-level files in module must be directories.");
}

Expand Down

0 comments on commit eab3805

Please sign in to comment.