summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2010-08-08 12:46:01 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-08-08 12:46:01 +0100
commit49ce307cb7957ceab2bf71ad8f75d1a44526ec85 (patch)
tree0095728a01f50e45de4910919fbc9a7b4e7234b9
parentcaa8f156b6bf03b61539c47f76aaa7818ddbc24f (diff)
checks: skip id3mux unit tests that need id3demux if id3demux is not available
-rw-r--r--tests/check/elements/id3mux.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/tests/check/elements/id3mux.c b/tests/check/elements/id3mux.c
index 32c6ddd69..42e43919f 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);