mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
Add better model test error messaging (#7239)
This commit is contained in:
parent
e7c5dcd572
commit
10102c09b6
1 changed files with 4 additions and 0 deletions
|
|
@ -143,6 +143,10 @@ std::string GetTestDataPath() {
|
|||
auto hardcodedModelPath = parentPath.string() + "\\models";
|
||||
if (std::filesystem::exists(hardcodedModelPath) && hardcodedModelPath.length() <= MAX_PATH) {
|
||||
return hardcodedModelPath;
|
||||
} else {
|
||||
std::string errorStr = "WINML_TEST_DATA_PATH environment variable path not found and \"models\" folder not found in same directory as test exe.\n";
|
||||
std::cerr << errorStr;
|
||||
throw std::exception(errorStr.c_str());
|
||||
}
|
||||
}
|
||||
const std::string testDataPathFolderName = "\\testData\\";
|
||||
|
|
|
|||
Loading…
Reference in a new issue