Revert "call resetDevice if gpu test fails"

This reverts commit ab25fe9e37.
This commit is contained in:
Vladislav Vinogradov
2012-12-19 11:13:31 +04:00
parent 41c9377db0
commit 4ba33fa1ed
36 changed files with 5694 additions and 9450 deletions

View File

@@ -69,169 +69,82 @@ struct NVidiaTest : TestWithParam<cv::gpu::DeviceInfo>
struct NPPST : NVidiaTest {};
struct NCV : NVidiaTest {};
TEST_P(NPPST, Integral)
{
try
{
bool res = nvidia_NPPST_Integral_Image(_path, nvidiaTestOutputLevel);
//TEST_P(NPPST, Integral)
//{
// bool res = nvidia_NPPST_Integral_Image(path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
catch (...)
{
cv::gpu::resetDevice();
throw;
}
}
// ASSERT_TRUE(res);
//}
TEST_P(NPPST, SquaredIntegral)
{
try
{
bool res = nvidia_NPPST_Squared_Integral_Image(_path, nvidiaTestOutputLevel);
bool res = nvidia_NPPST_Squared_Integral_Image(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
catch (...)
{
cv::gpu::resetDevice();
throw;
}
ASSERT_TRUE(res);
}
TEST_P(NPPST, RectStdDev)
{
try
{
bool res = nvidia_NPPST_RectStdDev(_path, nvidiaTestOutputLevel);
bool res = nvidia_NPPST_RectStdDev(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
catch (...)
{
cv::gpu::resetDevice();
throw;
}
ASSERT_TRUE(res);
}
TEST_P(NPPST, Resize)
{
try
{
bool res = nvidia_NPPST_Resize(_path, nvidiaTestOutputLevel);
bool res = nvidia_NPPST_Resize(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
catch (...)
{
cv::gpu::resetDevice();
throw;
}
ASSERT_TRUE(res);
}
TEST_P(NPPST, VectorOperations)
{
try
{
bool res = nvidia_NPPST_Vector_Operations(_path, nvidiaTestOutputLevel);
bool res = nvidia_NPPST_Vector_Operations(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
catch (...)
{
cv::gpu::resetDevice();
throw;
}
ASSERT_TRUE(res);
}
TEST_P(NPPST, Transpose)
{
try
{
bool res = nvidia_NPPST_Transpose(_path, nvidiaTestOutputLevel);
bool res = nvidia_NPPST_Transpose(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
catch (...)
{
cv::gpu::resetDevice();
throw;
}
ASSERT_TRUE(res);
}
TEST_P(NCV, VectorOperations)
{
try
{
bool res = nvidia_NCV_Vector_Operations(_path, nvidiaTestOutputLevel);
bool res = nvidia_NCV_Vector_Operations(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
catch (...)
{
cv::gpu::resetDevice();
throw;
}
ASSERT_TRUE(res);
}
TEST_P(NCV, HaarCascadeLoader)
{
try
{
bool res = nvidia_NCV_Haar_Cascade_Loader(_path, nvidiaTestOutputLevel);
bool res = nvidia_NCV_Haar_Cascade_Loader(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
catch (...)
{
cv::gpu::resetDevice();
throw;
}
ASSERT_TRUE(res);
}
TEST_P(NCV, HaarCascadeApplication)
{
try
{
bool res = nvidia_NCV_Haar_Cascade_Application(_path, nvidiaTestOutputLevel);
bool res = nvidia_NCV_Haar_Cascade_Application(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
catch (...)
{
cv::gpu::resetDevice();
throw;
}
ASSERT_TRUE(res);
}
TEST_P(NCV, HypothesesFiltration)
{
try
{
bool res = nvidia_NCV_Hypotheses_Filtration(_path, nvidiaTestOutputLevel);
bool res = nvidia_NCV_Hypotheses_Filtration(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
catch (...)
{
cv::gpu::resetDevice();
throw;
}
ASSERT_TRUE(res);
}
TEST_P(NCV, Visualization)
{
try
{
bool res = nvidia_NCV_Visualization(_path, nvidiaTestOutputLevel);
// this functionality doesn't used in gpu module
bool res = nvidia_NCV_Visualization(_path, nvidiaTestOutputLevel);
ASSERT_TRUE(res);
}
catch (...)
{
cv::gpu::resetDevice();
throw;
}
ASSERT_TRUE(res);
}
INSTANTIATE_TEST_CASE_P(GPU_NVidia, NPPST, ALL_DEVICES);