| 82 | } |
| 83 | |
| 84 | bool ValidateDirectory(std::string& dir) |
| 85 | { |
| 86 | if (dir.empty()) |
| 87 | { |
| 88 | std::cerr << "No directory specified" << std::endl; |
| 89 | return false; |
| 90 | } |
| 91 | |
| 92 | if (dir[dir.length() - 1] != '/') |
| 93 | { |
| 94 | dir += "/"; |
| 95 | } |
| 96 | |
| 97 | if (!fs::exists(dir)) |
| 98 | { |
| 99 | std::cerr << "Given directory " << dir << " does not exist" << std::endl; |
| 100 | return false; |
| 101 | } |
| 102 | |
| 103 | if (!fs::is_directory(dir)) |
| 104 | { |
| 105 | std::cerr << "Given directory [" << dir << "] is not a directory" << std::endl; |
| 106 | return false; |
| 107 | } |
| 108 | |
| 109 | return true; |
| 110 | } |
| 111 | |
| 112 | bool InferenceTest(const InferenceTestOptions& params, |
| 113 | const std::vector<unsigned int>& defaultTestCaseIds, |
no test coverage detected