Merge pull request #1530 from alalek:perf_tests_sanity_check_nothing

This commit is contained in:
Roman Donchenko 2013-10-01 17:39:18 +04:00 committed by OpenCV Buildbot
commit 4d88a6e856
4 changed files with 9 additions and 9 deletions

View File

@ -167,7 +167,7 @@ PERF_TEST_P(VideoMOGFixture, MOG,
typedef tuple<string, int> VideoMOG2ParamType; typedef tuple<string, int> VideoMOG2ParamType;
typedef TestBaseWithParam<VideoMOG2ParamType> VideoMOG2Fixture; typedef TestBaseWithParam<VideoMOG2ParamType> 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::Combine(::testing::Values("gpu/video/768x576.avi", "gpu/video/1920x1080.avi"),
::testing::Values(1, 3))) ::testing::Values(1, 3)))
{ {

View File

@ -161,7 +161,7 @@ PERF_TEST_P(setToFixture, setTo,
typedef tuple<Size, int, int> uploadParams; typedef tuple<Size, int, int> uploadParams;
typedef TestBaseWithParam<uploadParams> uploadFixture; typedef TestBaseWithParam<uploadParams> uploadFixture;
PERF_TEST_P(uploadFixture, DISABLED_upload, PERF_TEST_P(uploadFixture, upload,
testing::Combine( testing::Combine(
OCL_TYPICAL_MAT_SIZES, OCL_TYPICAL_MAT_SIZES,
testing::Range(CV_8U, CV_64F), testing::Range(CV_8U, CV_64F),
@ -190,15 +190,14 @@ PERF_TEST_P(uploadFixture, DISABLED_upload,
else else
OCL_PERF_ELSE OCL_PERF_ELSE
int value = 0; SANITY_CHECK_NOTHING();
SANITY_CHECK(value);
} }
/////////////////// download /////////////////////////// /////////////////// download ///////////////////////////
typedef TestBaseWithParam<uploadParams> downloadFixture; typedef TestBaseWithParam<uploadParams> downloadFixture;
PERF_TEST_P(downloadFixture, DISABLED_download, PERF_TEST_P(downloadFixture, download,
testing::Combine( testing::Combine(
OCL_TYPICAL_MAT_SIZES, OCL_TYPICAL_MAT_SIZES,
testing::Range(CV_8U, CV_64F), testing::Range(CV_8U, CV_64F),
@ -227,6 +226,5 @@ PERF_TEST_P(downloadFixture, DISABLED_download,
else else
OCL_PERF_ELSE OCL_PERF_ELSE
int value = 0; SANITY_CHECK_NOTHING();
SANITY_CHECK(value);
} }

View File

@ -209,6 +209,7 @@ private:
#define SANITY_CHECK(array, ...) ::perf::Regression::add(this, #array, array , ## __VA_ARGS__) #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_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_MATCHES(array, ...) ::perf::Regression::addMatches(this, #array, array , ## __VA_ARGS__)
#define SANITY_CHECK_NOTHING() this->setVerified();
class CV_EXPORTS GpuPerf class CV_EXPORTS GpuPerf
{ {
@ -345,12 +346,13 @@ private:
friend class TestBase; friend class TestBase;
}; };
friend class _declareHelper; friend class _declareHelper;
friend class Regression;
bool verified; bool verified;
public: public:
_declareHelper declare; _declareHelper declare;
void setVerified() { this->verified = true; }
}; };
template<typename T> class TestBaseWithParam: public TestBase, public ::testing::WithParamInterface<T> {}; template<typename T> class TestBaseWithParam: public TestBase, public ::testing::WithParamInterface<T> {};

View File

@ -107,7 +107,7 @@ Regression& Regression::instance()
Regression& Regression::add(TestBase* test, const std::string& name, cv::InputArray array, double eps, ERROR_TYPE err) 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); return instance()(name, array, eps, err);
} }