}
}
+static bool checkTestData = false;
bool skipUnstableTests = false;
bool runBigDataTests = false;
int testThreads = 0;
"{ test_threads |-1 |the number of worker threads, if parallel execution is enabled}"
"{ skip_unstable |false |skip unstable tests }"
"{ test_bigdata |false |run BigData tests (>=2Gb) }"
+ "{ test_require_data |false |fail on missing non-required test data instead of skip}"
"{ h help |false |print help info }";
cv::CommandLineParser parser(argc, argv, command_line_keys);
skipUnstableTests = parser.get<bool>("skip_unstable");
runBigDataTests = parser.get<bool>("test_bigdata");
+ checkTestData = parser.get<bool>("test_require_data");
}
#endif
#endif
const char* type = findDirectory ? "directory" : "data file";
- if (required)
+ if (required || checkTestData)
CV_Error(cv::Error::StsError, cv::format("OpenCV tests: Can't find required %s: %s", type, relative_path.c_str()));
throw SkipTestException(cv::format("OpenCV tests: Can't find %s: %s", type, relative_path.c_str()));
}