fixed tests (call resetDevice, if there was a gpu failure)

This commit is contained in:
Vladislav Vinogradov
2013-01-23 15:31:10 +04:00
parent 0773ab4d07
commit b7e6b5af1b
34 changed files with 2673 additions and 2556 deletions

View File

@@ -41,11 +41,9 @@
#include "test_precomp.hpp"
#if defined HAVE_CUDA
OutputLevel nvidiaTestOutputLevel = OutputLevelNone;
#endif
#ifdef HAVE_CUDA
#if defined HAVE_CUDA && !defined(CUDA_DISABLER)
OutputLevel nvidiaTestOutputLevel = OutputLevelNone;
using namespace cvtest;
using namespace testing;
@@ -69,77 +67,77 @@ struct NVidiaTest : TestWithParam<cv::gpu::DeviceInfo>
struct NPPST : NVidiaTest {};
struct NCV : NVidiaTest {};
//TEST_P(NPPST, Integral)
//{
// bool res = nvidia_NPPST_Integral_Image(path, nvidiaTestOutputLevel);
GPU_TEST_P(NPPST, Integral)
{
bool res = nvidia_NPPST_Integral_Image(_path, nvidiaTestOutputLevel);
// ASSERT_TRUE(res);
//}
ASSERT_TRUE(res);
}
TEST_P(NPPST, SquaredIntegral)
GPU_TEST_P(NPPST, SquaredIntegral)
{
bool res = nvidia_NPPST_Squared_Integral_Image(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NPPST, RectStdDev)
GPU_TEST_P(NPPST, RectStdDev)
{
bool res = nvidia_NPPST_RectStdDev(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NPPST, Resize)
GPU_TEST_P(NPPST, Resize)
{
bool res = nvidia_NPPST_Resize(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NPPST, VectorOperations)
GPU_TEST_P(NPPST, VectorOperations)
{
bool res = nvidia_NPPST_Vector_Operations(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NPPST, Transpose)
GPU_TEST_P(NPPST, Transpose)
{
bool res = nvidia_NPPST_Transpose(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NCV, VectorOperations)
GPU_TEST_P(NCV, VectorOperations)
{
bool res = nvidia_NCV_Vector_Operations(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NCV, HaarCascadeLoader)
GPU_TEST_P(NCV, HaarCascadeLoader)
{
bool res = nvidia_NCV_Haar_Cascade_Loader(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NCV, HaarCascadeApplication)
GPU_TEST_P(NCV, HaarCascadeApplication)
{
bool res = nvidia_NCV_Haar_Cascade_Application(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NCV, HypothesesFiltration)
GPU_TEST_P(NCV, HypothesesFiltration)
{
bool res = nvidia_NCV_Hypotheses_Filtration(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
TEST_P(NCV, Visualization)
GPU_TEST_P(NCV, Visualization)
{
// this functionality doesn't used in gpu module
bool res = nvidia_NCV_Visualization(_path, nvidiaTestOutputLevel);