From 19d825aa16fbc19e2cd124edd8027c078dae0f58 Mon Sep 17 00:00:00 2001 From: Maxim Pashchenkov Date: Tue, 24 Nov 2020 20:51:02 +0300 Subject: [PATCH] Merge pull request #18904 from mpashchenkov:mp/ocv-gapi-skip-gm-tests G-API: Adding skip for GraphMeta tests * Added skip for GraphMeta tests * Removed false --- modules/gapi/test/gapi_graph_meta_tests.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/modules/gapi/test/gapi_graph_meta_tests.cpp b/modules/gapi/test/gapi_graph_meta_tests.cpp index 73c0da3c9e..1cc4c0c7d8 100644 --- a/modules/gapi/test/gapi_graph_meta_tests.cpp +++ b/modules/gapi/test/gapi_graph_meta_tests.cpp @@ -99,7 +99,12 @@ TEST(GraphMeta, Streaming_AccessInput) { cv::GComputation graph(cv::GIn(in), cv::GOut(out1, out2)); auto ccomp = graph.compileStreaming(); - ccomp.setSource(findDataFile("cv/video/768x576.avi", false)); + const auto path = findDataFile("cv/video/768x576.avi"); + try { + ccomp.setSource(path); + } catch(...) { + throw SkipTestException("Video file can not be opened"); + } ccomp.start(); cv::Mat out_mat; @@ -122,7 +127,12 @@ TEST(GraphMeta, Streaming_AccessOutput) { cv::GComputation graph(cv::GIn(in), cv::GOut(out1, out2, out3)); auto ccomp = graph.compileStreaming(); - ccomp.setSource(findDataFile("cv/video/768x576.avi", false)); + const auto path = findDataFile("cv/video/768x576.avi"); + try { + ccomp.setSource(path); + } catch(...) { + throw SkipTestException("Video file can not be opened"); + } ccomp.start(); cv::Mat out_mat; @@ -155,7 +165,12 @@ TEST(GraphMeta, Streaming_AccessDesync) { cv::GComputation graph(cv::GIn(in), cv::GOut(out1, out2, out3, out4, out5)); auto ccomp = graph.compileStreaming(); - ccomp.setSource(findDataFile("cv/video/768x576.avi", false)); + const auto path = findDataFile("cv/video/768x576.avi"); + try { + ccomp.setSource(path); + } catch(...) { + throw SkipTestException("Video file can not be opened"); + } ccomp.start(); cv::optional out_sync_id;