From a17d1843fb7b416668e3b56165f668d1a3fd63a9 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 4 Jun 2020 09:59:09 +0300 Subject: [PATCH] Skip some GAPI tests if VideoCapture is not capable to playback video. --- modules/gapi/test/streaming/gapi_streaming_tests.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/gapi/test/streaming/gapi_streaming_tests.cpp b/modules/gapi/test/streaming/gapi_streaming_tests.cpp index 0c57f438cd98..1150e6a86294 100644 --- a/modules/gapi/test/streaming/gapi_streaming_tests.cpp +++ b/modules/gapi/test/streaming/gapi_streaming_tests.cpp @@ -730,6 +730,8 @@ TEST(GAPI_Streaming_Types, OutputScalar) cv::VideoCapture cap; cap.open(video_path); + if (!cap.isOpened()) + throw SkipTestException("Video file can not be opened"); cv::Mat tmp; cv::Scalar out_scl; @@ -774,6 +776,8 @@ TEST(GAPI_Streaming_Types, OutputVector) cv::VideoCapture cap; cap.open(video_path); + if (!cap.isOpened()) + throw SkipTestException("Video file can not be opened"); cv::Mat tmp; std::vector ref_vec;