Commit e3b3982d authored by Alexey Spizhevoy's avatar Alexey Spizhevoy

added check into opencv_test_gpu: whether OpenCV was compiled with CUDA or not

parent 58cb6c26
#include "test_precomp.hpp" #include "test_precomp.hpp"
CV_TEST_MAIN("gpu") int main(int argc, char **argv)
{
// Run test with --gtest_catch_exceptions flag to avoid runtime errors in cvtest::TS::ptr()->init("gpu");
// the case when there is no GPU ::testing::InitGoogleTest(&argc, argv);
#ifdef HAVE_CUDA
return RUN_ALL_TESTS();
#else
std::cerr << "opencv_test_gpu: OpenCV was compiled without GPU support\n";
return -1;
#endif
}
\ No newline at end of file
...@@ -125,11 +125,7 @@ struct CV_GpuMeanShiftTest : public cvtest::BaseTest ...@@ -125,11 +125,7 @@ struct CV_GpuMeanShiftTest : public cvtest::BaseTest
}; };
///////////////////////////////////////////////////////////////////////////// TEST(meanShift, accuracy) { CV_GpuMeanShiftTest test; test.safe_run(); }
/////////////////// tests registration /////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
CV_GpuMeanShiftTest CV_GpuMeanShift_test;
struct CV_GpuMeanShiftProcTest : public cvtest::BaseTest struct CV_GpuMeanShiftProcTest : public cvtest::BaseTest
{ {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define __OPENCV_TEST_PRECOMP_HPP__ #define __OPENCV_TEST_PRECOMP_HPP__
#include <limits> #include <limits>
#include <cvconfig.h>
#include "opencv2/core/core.hpp" #include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp" #include "opencv2/highgui/highgui.hpp"
#include "opencv2/calib3d/calib3d.hpp" #include "opencv2/calib3d/calib3d.hpp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment