}
};
+extern uint64 param_seed;
+
struct CV_EXPORTS DefaultRngAuto
{
const uint64 old_state;
- DefaultRngAuto() : old_state(cv::theRNG().state) { cv::theRNG().state = (uint64)-1; }
+ DefaultRngAuto() : old_state(cv::theRNG().state) { cv::theRNG().state = cvtest::param_seed; }
~DefaultRngAuto() { cv::theRNG().state = old_state; }
DefaultRngAuto& operator=(const DefaultRngAuto&);
void checkIppStatus();
}
-#define CV_TEST_INIT cv::ipp::setIppStatus(0);
+#define CV_TEST_INIT \
+ cv::ipp::setIppStatus(0); \
+ cv::theRNG().state = cvtest::param_seed;
#define CV_TEST_CLEANUP ::cvtest::checkIppStatus();
#define CV_TEST_BODY_IMPL \
{ \
namespace cvtest
{
+uint64 param_seed = 0x12345678; // real value is passed via parseCustomOptions function
+
static std::string path_join(const std::string& prefix, const std::string& subpath)
{
CV_Assert(subpath.empty() || subpath[0] != '/');
{
const char * const command_line_keys =
"{ ipp test_ipp_check |false |check whether IPP works without failures }"
+ "{ test_seed |809564 |seed for random numbers generator }"
"{ h help |false |print help info }";
cv::CommandLineParser parser(argc, argv, command_line_keys);
#else
test_ipp_check = false;
#endif
+
+ param_seed = parser.get<unsigned int>("test_seed");
}
static double param_max_deviation;
static unsigned int param_min_samples;
static unsigned int param_force_samples;
-static uint64 param_seed;
static double param_time_limit;
static int param_threads;
static bool param_write_sanity;