From c68b7f944a907070b8d65bef3c252a1ecc6336cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 21 Jun 2016 17:51:38 +0100 Subject: [PATCH] tests: splitmux: skip tests if theora or ogg plugins are not available https://bugzilla.gnome.org/show_bug.cgi?id=767861 --- tests/check/elements/splitmux.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/check/elements/splitmux.c b/tests/check/elements/splitmux.c index 428357ecfc..7f4896d7fe 100644 --- a/tests/check/elements/splitmux.c +++ b/tests/check/elements/splitmux.c @@ -287,16 +287,28 @@ splitmux_suite (void) Suite *s = suite_create ("splitmux"); TCase *tc_chain = tcase_create ("general"); TCase *tc_chain_basic = tcase_create ("basic"); + gboolean have_theora, have_ogg; + + /* we assume that if encoder/muxer are there, decoder/demuxer will be a well */ + have_theora = gst_registry_check_feature_version (gst_registry_get (), + "theoraenc", GST_VERSION_MAJOR, GST_VERSION_MINOR, 0); + have_ogg = gst_registry_check_feature_version (gst_registry_get (), + "oggmux", GST_VERSION_MAJOR, GST_VERSION_MINOR, 0); suite_add_tcase (s, tc_chain); suite_add_tcase (s, tc_chain_basic); tcase_add_test (tc_chain_basic, test_splitmuxsink_reuse_simple); - tcase_add_checked_fixture (tc_chain, tempdir_setup, tempdir_cleanup); - tcase_add_test (tc_chain, test_splitmuxsrc); - tcase_add_test (tc_chain, test_splitmuxsrc_format_location); - tcase_add_test (tc_chain, test_splitmuxsink); + if (have_theora && have_ogg) { + tcase_add_checked_fixture (tc_chain, tempdir_setup, tempdir_cleanup); + + tcase_add_test (tc_chain, test_splitmuxsrc); + tcase_add_test (tc_chain, test_splitmuxsrc_format_location); + tcase_add_test (tc_chain, test_splitmuxsink); + } else { + GST_INFO ("Skipping tests, missing plugins: theora and/or ogg"); + } return s; }