diff options
author | Edward Hervey <bilboed@bilboed.com> | 2009-03-21 16:48:53 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-03-21 16:48:53 +0100 |
commit | 4c533ba87a1fcb4daba29488fad6b24a552f2aca (patch) | |
tree | 37ad8b41c88d39e47efe24f1de6dc321c28b70ee /tests/check | |
parent | 8176747c4538b4d60d7ade9d2b52a24088b13064 (diff) |
Fix tests when running on systems with alpha. Fixes #563507
Diffstat (limited to 'tests/check')
-rw-r--r-- | tests/check/common.h | 6 | ||||
-rw-r--r-- | tests/check/complex.c | 6 | ||||
-rw-r--r-- | tests/check/gnloperation.c | 6 | ||||
-rw-r--r-- | tests/check/gnlsource.c | 4 | ||||
-rw-r--r-- | tests/check/simple.c | 6 |
5 files changed, 22 insertions, 6 deletions
diff --git a/tests/check/common.h b/tests/check/common.h index bffaf1b..8b8b322 100644 --- a/tests/check/common.h +++ b/tests/check/common.h @@ -164,12 +164,14 @@ videotest_in_bin_gnl_src (const gchar * name, guint64 start, gint64 duration, gi GstElement * alpha = NULL; GstPad *srcpad = NULL; + alpha = gst_element_factory_make ("alpha", NULL); + if (alpha == NULL) + return NULL; + videotestsrc = gst_element_factory_make_or_warn ("videotestsrc", NULL); g_object_set (G_OBJECT (videotestsrc), "pattern", pattern, NULL); bin = gst_bin_new (NULL); - alpha = gst_element_factory_make_or_warn ("alpha", NULL); - gnlsource = new_gnl_src (name, start, duration, priority); gst_bin_add (GST_BIN (bin), videotestsrc); diff --git a/tests/check/complex.c b/tests/check/complex.c index 60da9c3..bdfe3d6 100644 --- a/tests/check/complex.c +++ b/tests/check/complex.c @@ -683,7 +683,11 @@ GST_START_TEST (test_one_bin_space_another) Priority : 1 */ source1 = videotest_in_bin_gnl_src ("source1", 0, 1 * GST_SECOND, 1, 1); - fail_if (source1 == NULL); + if (source1 == NULL) { + gst_object_unref (pipeline); + gst_object_unref (comp); + return; + } check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND); /* diff --git a/tests/check/gnloperation.c b/tests/check/gnloperation.c index 038d7b6..aa668f0 100644 --- a/tests/check/gnloperation.c +++ b/tests/check/gnloperation.c @@ -683,7 +683,11 @@ GST_START_TEST (test_complex_operations) */ source1 = videotest_in_bin_gnl_src ("source1", 0, 4 * GST_SECOND, 1, 3); - fail_if (source1 == NULL); + if (source1 == NULL) { + gst_object_unref (pipeline); + gst_object_unref (comp); + return; + } check_start_stop_duration (source1, 0, 4 * GST_SECOND, 4 * GST_SECOND); /* diff --git a/tests/check/gnlsource.c b/tests/check/gnlsource.c index c2252c7..3a38eb3 100644 --- a/tests/check/gnlsource.c +++ b/tests/check/gnlsource.c @@ -124,7 +124,9 @@ GST_START_TEST (test_videotestsrc_in_bin) Priority : 1 */ gnlsource = videotest_in_bin_gnl_src ("source1", 0, 1 * GST_SECOND, 1, 1); - fail_if (gnlsource == NULL); + /* Handle systems which don't have alpha available */ + if (gnlsource == NULL) + return; check_start_stop_duration (gnlsource, 0, 1 * GST_SECOND, 1 * GST_SECOND); sink = gst_element_factory_make_or_warn ("fakesink", "sink"); diff --git a/tests/check/simple.c b/tests/check/simple.c index cd35096..c61f1a7 100644 --- a/tests/check/simple.c +++ b/tests/check/simple.c @@ -430,7 +430,11 @@ GST_START_TEST (test_one_bin_after_other) Priority : 1 */ source1 = videotest_in_bin_gnl_src ("source1", 0, 1 * GST_SECOND, 1, 1); - fail_if (source1 == NULL); + if (source1 == NULL) { + gst_object_unref (pipeline); + gst_object_unref (comp); + return; + } check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND); /* |