[gst-cvs] gst-plugins-bad: checks: skip id3mux unit tests that need id3demux if id3demux is not available

Tim Müller tpm at kemper.freedesktop.org
Sun Aug 8 04:46:35 PDT 2010


Module: gst-plugins-bad
Branch: master
Commit: 49ce307cb7957ceab2bf71ad8f75d1a44526ec85
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=49ce307cb7957ceab2bf71ad8f75d1a44526ec85

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Sun Aug  8 12:46:01 2010 +0100

checks: skip id3mux unit tests that need id3demux if id3demux is not available

---

 tests/check/elements/id3mux.c |   27 +++++++++------------------
 1 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/tests/check/elements/id3mux.c b/tests/check/elements/id3mux.c
index 32c6ddd..42e4391 100644
--- a/tests/check/elements/id3mux.c
+++ b/tests/check/elements/id3mux.c
@@ -546,25 +546,16 @@ id3mux_suite (void)
   TCase *tc_chain = tcase_create ("general");
 
   suite_add_tcase (s, tc_chain);
-  tcase_add_test (tc_chain, test_id3mux_v2_3);
-  tcase_add_test (tc_chain, test_id3mux_v2_4);
+
+  if (gst_default_registry_check_feature_version ("id3demux",
+          GST_VERSION_MAJOR, GST_VERSION_MINOR, 0)) {
+    tcase_add_test (tc_chain, test_id3mux_v2_3);
+    tcase_add_test (tc_chain, test_id3mux_v2_4);
+  } else {
+    GST_WARNING ("id3demux element not available, skipping tests");
+  }
 
   return s;
 }
 
-int
-main (int argc, char **argv)
-{
-  int nf;
-
-  Suite *s = id3mux_suite ();
-  SRunner *sr = srunner_create (s);
-
-  gst_check_init (&argc, &argv);
-
-  srunner_run_all (sr, CK_NORMAL);
-  nf = srunner_ntests_failed (sr);
-  srunner_free (sr);
-
-  return nf;
-}
+GST_CHECK_MAIN (id3mux);





More information about the Gstreamer-commits mailing list