mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
test: reproducible results, enabled 2-channel tests, increased some thresholds
This commit is contained in:
committed by
Maksim Shabunin
parent
c664cf3717
commit
69020666fe
+11
-4
@@ -621,20 +621,27 @@ void TS::set_gtest_status()
|
||||
|
||||
void TS::update_context( BaseTest* test, int test_case_idx, bool update_ts_context )
|
||||
{
|
||||
CV_UNUSED(update_ts_context);
|
||||
|
||||
if( current_test_info.test != test )
|
||||
{
|
||||
for( int i = 0; i <= CONSOLE_IDX; i++ )
|
||||
output_buf[i] = string();
|
||||
rng = RNG(params.rng_seed);
|
||||
current_test_info.rng_seed0 = current_test_info.rng_seed = rng.state;
|
||||
}
|
||||
|
||||
if (test_case_idx >= 0)
|
||||
{
|
||||
current_test_info.rng_seed = param_seed + test_case_idx;
|
||||
current_test_info.rng_seed0 = current_test_info.rng_seed;
|
||||
|
||||
rng = RNG(current_test_info.rng_seed);
|
||||
cv::theRNG() = rng;
|
||||
}
|
||||
|
||||
current_test_info.test = test;
|
||||
current_test_info.test_case_idx = test_case_idx;
|
||||
current_test_info.code = 0;
|
||||
cvSetErrStatus( CV_StsOk );
|
||||
if( update_ts_context )
|
||||
current_test_info.rng_seed = rng.state;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user