mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge pull request #18819 from mpashchenkov:mp/ocv-gapi-skip-centos-tests
G-API: Adding a skip for failed streaming tests * Skip tests * Pathfinding * Pathfinding part 2 * Pathfinding part 3 * Fix review comments
This commit is contained in:
committed by
GitHub
parent
ce8027c6fb
commit
94e8a08d1d
@@ -51,9 +51,9 @@ namespace
|
||||
{
|
||||
// Since G-API has no own test data (yet), it is taken from the common space
|
||||
const char* testDataPath = getenv("OPENCV_TEST_DATA_PATH");
|
||||
GAPI_Assert(testDataPath != nullptr);
|
||||
|
||||
cvtest::addDataSearchPath(testDataPath);
|
||||
if (testDataPath) {
|
||||
cvtest::addDataSearchPath(testDataPath);
|
||||
}
|
||||
initialized = true;
|
||||
}
|
||||
#endif // WINRT
|
||||
@@ -192,8 +192,12 @@ TEST(StatefulKernel, StateIsAutoResetForNewStream)
|
||||
// Compilation & testing
|
||||
auto ccomp = c.compileStreaming(cv::compile_args(pkg));
|
||||
|
||||
ccomp.setSource(gapi::wip::make_src<cv::gapi::wip::GCaptureSource>
|
||||
(findDataFile("cv/video/768x576.avi")));
|
||||
auto path = findDataFile("cv/video/768x576.avi");
|
||||
try {
|
||||
ccomp.setSource(gapi::wip::make_src<cv::gapi::wip::GCaptureSource>(path));
|
||||
} catch(...) {
|
||||
throw SkipTestException("Video file can not be opened");
|
||||
}
|
||||
ccomp.start();
|
||||
EXPECT_TRUE(ccomp.running());
|
||||
|
||||
@@ -204,8 +208,12 @@ TEST(StatefulKernel, StateIsAutoResetForNewStream)
|
||||
}
|
||||
EXPECT_FALSE(ccomp.running());
|
||||
|
||||
ccomp.setSource(gapi::wip::make_src<cv::gapi::wip::GCaptureSource>
|
||||
(findDataFile("cv/video/1920x1080.avi")));
|
||||
path = findDataFile("cv/video/1920x1080.avi");
|
||||
try {
|
||||
ccomp.setSource(gapi::wip::make_src<cv::gapi::wip::GCaptureSource>(path));
|
||||
} catch(...) {
|
||||
throw SkipTestException("Video file can not be opened");
|
||||
}
|
||||
ccomp.start();
|
||||
EXPECT_TRUE(ccomp.running());
|
||||
|
||||
@@ -335,14 +343,22 @@ TEST(StatefulKernel, StateIsInitViaCompArgsInStreaming)
|
||||
cv::compile_args(pkg, BackSubStateParams { "knn" }));
|
||||
|
||||
// Testing G-API Background Substractor in streaming mode
|
||||
gapiBackSub.setSource(gapi::wip::make_src<cv::gapi::wip::GCaptureSource>
|
||||
(findDataFile("cv/video/768x576.avi")));
|
||||
auto path = findDataFile("cv/video/768x576.avi");
|
||||
try {
|
||||
gapiBackSub.setSource(gapi::wip::make_src<cv::gapi::wip::GCaptureSource>(path));
|
||||
} catch(...) {
|
||||
throw SkipTestException("Video file can not be opened");
|
||||
}
|
||||
// Allowing 1% difference of all pixels between G-API and reference OpenCV results
|
||||
testBackSubInStreaming(gapiBackSub, 1);
|
||||
|
||||
// Additionally, test the case when the new stream happens
|
||||
gapiBackSub.setSource(gapi::wip::make_src<cv::gapi::wip::GCaptureSource>
|
||||
(findDataFile("cv/video/1920x1080.avi")));
|
||||
path = findDataFile("cv/video/1920x1080.avi");
|
||||
try {
|
||||
// Additionally, test the case when the new stream happens
|
||||
gapiBackSub.setSource(gapi::wip::make_src<cv::gapi::wip::GCaptureSource>(path));
|
||||
} catch(...) {
|
||||
throw SkipTestException("Video file can not be opened");
|
||||
}
|
||||
// Allowing 5% difference of all pixels between G-API and reference OpenCV results
|
||||
testBackSubInStreaming(gapiBackSub, 5);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user