From 66e4aead97e3692d85fdb34909f2a8441a71c110 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 30 Sep 2013 16:07:50 +0400 Subject: [PATCH 1/2] perf tests: added SANITY_CHECK_NOTHING() --- modules/ts/include/opencv2/ts/ts_perf.hpp | 4 +++- modules/ts/src/ts_perf.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ts/include/opencv2/ts/ts_perf.hpp b/modules/ts/include/opencv2/ts/ts_perf.hpp index fa88dadb8c..70ad571e09 100644 --- a/modules/ts/include/opencv2/ts/ts_perf.hpp +++ b/modules/ts/include/opencv2/ts/ts_perf.hpp @@ -209,6 +209,7 @@ private: #define SANITY_CHECK(array, ...) ::perf::Regression::add(this, #array, array , ## __VA_ARGS__) #define SANITY_CHECK_KEYPOINTS(array, ...) ::perf::Regression::addKeypoints(this, #array, array , ## __VA_ARGS__) #define SANITY_CHECK_MATCHES(array, ...) ::perf::Regression::addMatches(this, #array, array , ## __VA_ARGS__) +#define SANITY_CHECK_NOTHING() this->setVerified(); class CV_EXPORTS GpuPerf { @@ -345,12 +346,13 @@ private: friend class TestBase; }; friend class _declareHelper; - friend class Regression; bool verified; public: _declareHelper declare; + + void setVerified() { this->verified = true; } }; template class TestBaseWithParam: public TestBase, public ::testing::WithParamInterface {}; diff --git a/modules/ts/src/ts_perf.cpp b/modules/ts/src/ts_perf.cpp index dc7f45320e..7adc246f48 100644 --- a/modules/ts/src/ts_perf.cpp +++ b/modules/ts/src/ts_perf.cpp @@ -107,7 +107,7 @@ Regression& Regression::instance() Regression& Regression::add(TestBase* test, const std::string& name, cv::InputArray array, double eps, ERROR_TYPE err) { - if(test) test->verified = true; + if(test) test->setVerified(); return instance()(name, array, eps, err); } From a8ac3ec72aaa4fb142365626934c0f7c4904f677 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 30 Sep 2013 16:08:08 +0400 Subject: [PATCH 2/2] ocl: perf test: disable MOG2 (random hungs), enable upload/download --- modules/ocl/perf/perf_bgfg.cpp | 2 +- modules/ocl/perf/perf_matrix_operation.cpp | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/ocl/perf/perf_bgfg.cpp b/modules/ocl/perf/perf_bgfg.cpp index cd84509bc0..3180f1bbbe 100644 --- a/modules/ocl/perf/perf_bgfg.cpp +++ b/modules/ocl/perf/perf_bgfg.cpp @@ -167,7 +167,7 @@ PERF_TEST_P(VideoMOGFixture, MOG, typedef tuple VideoMOG2ParamType; typedef TestBaseWithParam VideoMOG2Fixture; -PERF_TEST_P(VideoMOG2Fixture, MOG2, +PERF_TEST_P(VideoMOG2Fixture, DISABLED_MOG2, // TODO Disabled: random hungs on buildslave ::testing::Combine(::testing::Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"), ::testing::Values(1, 3))) { diff --git a/modules/ocl/perf/perf_matrix_operation.cpp b/modules/ocl/perf/perf_matrix_operation.cpp index 13ce47a1bc..8266f0930d 100644 --- a/modules/ocl/perf/perf_matrix_operation.cpp +++ b/modules/ocl/perf/perf_matrix_operation.cpp @@ -161,7 +161,7 @@ PERF_TEST_P(setToFixture, setTo, typedef tuple uploadParams; typedef TestBaseWithParam uploadFixture; -PERF_TEST_P(uploadFixture, DISABLED_upload, +PERF_TEST_P(uploadFixture, upload, testing::Combine( OCL_TYPICAL_MAT_SIZES, testing::Range(CV_8U, CV_64F), @@ -190,15 +190,14 @@ PERF_TEST_P(uploadFixture, DISABLED_upload, else OCL_PERF_ELSE - int value = 0; - SANITY_CHECK(value); + SANITY_CHECK_NOTHING(); } /////////////////// download /////////////////////////// typedef TestBaseWithParam downloadFixture; -PERF_TEST_P(downloadFixture, DISABLED_download, +PERF_TEST_P(downloadFixture, download, testing::Combine( OCL_TYPICAL_MAT_SIZES, testing::Range(CV_8U, CV_64F), @@ -227,6 +226,5 @@ PERF_TEST_P(downloadFixture, DISABLED_download, else OCL_PERF_ELSE - int value = 0; - SANITY_CHECK(value); + SANITY_CHECK_NOTHING(); }