diff --git a/Tools/TestCases/ToolResults.h b/Tools/TestCases/ToolResults.h index e8972bb..ff7c44f 100644 --- a/Tools/TestCases/ToolResults.h +++ b/Tools/TestCases/ToolResults.h @@ -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; diff --git a/Tools/ToolSummary/ToolSummary.cpp b/Tools/ToolSummary/ToolSummary.cpp index f6edbe4..f96c472 100644 --- a/Tools/ToolSummary/ToolSummary.cpp +++ b/Tools/ToolSummary/ToolSummary.cpp @@ -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; }