void BaseTest::run( int start_from ) { int test_case_idx, count = get_test_case_count(); int64 t_start = cvGetTickCount(); double freq = cv::getTickFrequency(); bool ff = can_do_fast_forward(); int progress = 0, code; int64 t1 = t_start; for( test_case_idx = ff && start_from >= 0 ? start_from : 0; count < 0 || test_case_idx < count; test_case_idx++ ) { ts->update_context( this, test_case_idx, ff ); progress = update_progress( progress, test_case_idx, count, (double)(t1 - t_start)/(freq*1000) ); code = prepare_test_case( test_case_idx ); if( code < 0 || ts->get_err_code() < 0 ) return; if( code == 0 ) continue; run_func(); if( ts->get_err_code() < 0 ) return; if( validate_test_results( test_case_idx ) < 0 || ts->get_err_code() < 0 ) return; } }
void CV_MLBaseTest::run( int start_from ) { int code = CvTS::OK; start_from = 0; for (int i = 0; i < test_case_count; i++) { int temp_code = run_test_case( i ); if (temp_code == CvTS::OK) temp_code = validate_test_results( i ); if (temp_code != CvTS::OK) code = temp_code; } if ( test_case_count <= 0) { ts->printf( CvTS::LOG, "validation file is not determined or not correct" ); code = CvTS::FAIL_INVALID_TEST_DATA; } ts->set_failed_test_info( code ); }