ocl: skip unstable tests

during pre-commit testing
pull/10236/head
Alexander Alekhin 7 years ago
parent 4781f0a337
commit 3a8a73ef6c
  1. 1
      modules/ts/include/opencv2/ts/ts_ext.hpp
  2. 3
      modules/ts/misc/run.py
  3. 5
      modules/ts/src/ts.cpp
  4. 3
      modules/ts/src/ts_perf.cpp
  5. 9
      modules/video/perf/opencl/perf_optflow_pyrlk.cpp
  6. 9
      modules/video/test/ocl/test_optflowpyrlk.cpp

@ -10,6 +10,7 @@
namespace cvtest {
void checkIppStatus();
extern bool skipUnstableTests;
}
#define CV__TEST_INIT \

@ -92,6 +92,9 @@ if __name__ == "__main__":
if not [a for a in test_args if a.startswith("--perf_verify_sanity")] :
test_args.extend(["--perf_verify_sanity"])
if bool(os.environ.get('BUILD_PRECOMMIT', None)):
test_args.extend(["--skip_unstable=1"])
ret = 0
logs = []
for path in args.build_path:

@ -694,11 +694,14 @@ void checkIppStatus()
}
}
bool skipUnstableTests = false;
void parseCustomOptions(int argc, char **argv)
{
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 }"
"{ skip_unstable |false |skip unstable tests }"
"{ h help |false |print help info }";
cv::CommandLineParser parser(argc, argv, command_line_keys);
@ -717,6 +720,8 @@ void parseCustomOptions(int argc, char **argv)
#endif
param_seed = parser.get<unsigned int>("test_seed");
skipUnstableTests = parser.get<bool>("skip_unstable");
}

@ -999,6 +999,7 @@ void TestBase::Init(const std::vector<std::string> & availableImpls,
"{ perf_cuda_device |0 |run CUDA test suite onto specific CUDA capable device}"
"{ perf_cuda_info_only |false |print an information about system and an available CUDA devices and then exit.}"
#endif
"{ skip_unstable |false |skip unstable tests }"
;
cv::CommandLineParser args(argc, argv, command_line_keys);
@ -1097,6 +1098,8 @@ void TestBase::Init(const std::vector<std::string> & availableImpls,
exit(0);
#endif
skipUnstableTests = args.get<bool>("skip_unstable");
if (available_impls.size() > 1)
printf("[----------]\n[ INFO ] \tImplementation variant: %s.\n[----------]\n", param_impl.c_str()), fflush(stdout);

@ -80,6 +80,15 @@ OCL_PERF_TEST_P(PyrLKOpticalFlowFixture, PyrLKOpticalFlow,
const PyrLKOpticalFlowParams params = GetParam();
const int pointsCount = get<0>(params);
// SKIP unstable tests
#ifdef __linux__
if (cvtest::skipUnstableTests && ocl::useOpenCL())
{
if (ocl::Device::getDefault().isIntel())
throw ::perf::TestBase::PerfSkipTestException();
}
#endif
vector<Point2f> pts;
goodFeaturesToTrack(frame0, pts, pointsCount, 0.01, 0.0);
Mat ptsMat(1, static_cast<int>(pts.size()), CV_32FC2, (void *)&pts[0]);

@ -87,6 +87,15 @@ OCL_TEST_P(PyrLKOpticalFlow, Mat)
ASSERT_FALSE(frame1.empty());
UMat umatFrame1; frame1.copyTo(umatFrame1);
// SKIP unstable tests
#ifdef __linux__
if (cvtest::skipUnstableTests && ocl::useOpenCL())
{
if (ocl::Device::getDefault().isIntel())
throw cvtest::SkipTestException("Skip unstable test");
}
#endif
std::vector<cv::Point2f> pts;
cv::goodFeaturesToTrack(frame0, pts, npoints, 0.01, 0.0);

Loading…
Cancel
Save