Skip to content

Commit

Permalink
Add isResultsFile query
Browse files Browse the repository at this point in the history
  • Loading branch information
LegalizeAdulthood committed Jan 18, 2024
1 parent 768cc6c commit dc0de96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Tools/TestCases/ToolResults.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ inline std::string toolNameFromResultsFile(std::filesystem::path path)
return file.substr(0, pos);
}

inline bool isResultsFile(std::filesystem::path path)
{
return !toolNameFromResultsFile(path).empty();
}

struct TestSummary
{
std::string name;
Expand Down
4 changes: 1 addition & 3 deletions Tools/ToolSummary/ToolSummary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ void scanResultsDirectory(std::filesystem::path dir)
{
continue;
}

const std::string toolName = testCases::toolNameFromResultsFile(entry.path());
if (toolName.empty())
if (!testCases::isResultsFile(entry))
{
continue;
}
Expand Down

0 comments on commit dc0de96

Please sign in to comment.