From ca40a749b66ca84ffe783f2a14f6306fdbc2a54c Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Wed, 1 Oct 2014 09:13:35 +0400 Subject: [PATCH] Turn off superres accuracy tests if video i/o is not supported. --- modules/superres/test/test_precomp.hpp | 13 +++++++++++++ modules/superres/test/test_superres.cpp | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/modules/superres/test/test_precomp.hpp b/modules/superres/test/test_precomp.hpp index 8102d432b..b018a6871 100644 --- a/modules/superres/test/test_precomp.hpp +++ b/modules/superres/test/test_precomp.hpp @@ -60,4 +60,17 @@ #include "opencv2/superres/superres.hpp" #include "input_array_utility.hpp" +#if defined(HAVE_XINE) || \ + defined(HAVE_GSTREAMER) || \ + defined(HAVE_QUICKTIME) || \ + defined(HAVE_QTKIT) || \ + defined(HAVE_AVFOUNDATION) || \ + defined(HAVE_FFMPEG) || \ + defined(HAVE_MSMF) || \ + defined(HAVE_VFW) +# define BUILD_WITH_VIDEO_INPUT_SUPPORT 1 +#else +# define BUILD_WITH_VIDEO_INPUT_SUPPORT 0 +#endif + #endif diff --git a/modules/superres/test/test_superres.cpp b/modules/superres/test/test_superres.cpp index 14d8eaf35..c3aad3936 100644 --- a/modules/superres/test/test_superres.cpp +++ b/modules/superres/test/test_superres.cpp @@ -42,6 +42,8 @@ #include "test_precomp.hpp" +#if BUILD_WITH_VIDEO_INPUT_SUPPORT + class AllignedFrameSource : public cv::superres::FrameSource { public: @@ -291,3 +293,5 @@ TEST_F(SuperResolution, BTVL1_OCL) RunTest(cv::superres::createSuperResolution_BTVL1_OCL()); } #endif + +#endif // BUILD_WITH_VIDEO_INPUT_SUPPORT