Revert "call resetDevice if gpu test fails"
This reverts commit ab25fe9e37
.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user