tests/check/Makefile.am: Disable autodetect test temporarily, so that the build bots...
authorTim-Philipp Müller <tim@centricular.net>
Fri, 29 Sep 2006 15:39:41 +0000 (15:39 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Fri, 29 Sep 2006 15:39:41 +0000 (15:39 +0000)
Original commit message from CVS:
* tests/check/Makefile.am:
Disable autodetect test temporarily, so that the build bots
update -bad and the ranks of unreliable video sinks in there.
* tests/check/elements/autodetect.c: (GST_START_TEST):
Skip test if no usable videosink is found.

ChangeLog
tests/check/Makefile.am
tests/check/elements/autodetect.c

index cc6c55b..ab5a186 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-09-29  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * tests/check/Makefile.am:
+         Disable autodetect test temporarily, so that the build bots
+         update -bad and the ranks of unreliable video sinks in there.
+
+       * tests/check/elements/autodetect.c: (GST_START_TEST):
+         Skip test if no usable videosink is found.
+
 2006-09-29  Wim Taymans  <wim@fluendo.com>
 
        * gst/rtsp/URLS:
index c649b8e..55198e3 100644 (file)
@@ -34,7 +34,6 @@ endif
 check_PROGRAMS = \
        $(check_annodex) \
        elements/audiopanorama \
-       elements/autodetect \
        elements/avimux \
        elements/level \
        elements/matroskamux \
@@ -44,7 +43,9 @@ check_PROGRAMS = \
 TESTS = $(check_PROGRAMS)
 
 # these tests don't even pass
-noinst_PROGRAMS =
+# autodetect: temporarily disabled because of broken videosinks in -bad
+noinst_PROGRAMS = \
+       elements/autodetect
 
 AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS)
 LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS)
index 6556243..a7b6190 100644 (file)
@@ -30,10 +30,23 @@ GST_START_TEST (test_autovideosink_ghostpad_error_case)
   GstElement *pipeline, *src, *filter, *sink;
   GstCaps *caps;
 
+  /* check that there's a usable video sink (think of build bot case) */
+  sink = gst_element_factory_make ("autovideosink", NULL);
+  state_ret = gst_element_set_state (sink, GST_STATE_READY);
+
+  /* need to set state back to NULL, or our test won't work since we
+   * already have detected the real caps in ready and then linking fails */
+  gst_element_set_state (sink, GST_STATE_NULL);
+
+  if (state_ret != GST_STATE_CHANGE_SUCCESS) {
+    GST_WARNING ("No usable video sink, skipping test");
+    gst_object_unref (sink);
+    return;
+  }
+
   pipeline = gst_pipeline_new ("pipeline");
   src = gst_element_factory_make ("fakesrc", NULL);
   filter = gst_element_factory_make ("capsfilter", NULL);
-  sink = gst_element_factory_make ("autovideosink", NULL);
 
   caps = gst_caps_new_simple ("video/x-raw-yuv", "format", GST_TYPE_FOURCC,
       GST_MAKE_FOURCC ('A', 'C', 'D', 'C'), NULL);
@@ -71,10 +84,23 @@ GST_START_TEST (test_autoaudiosink_ghostpad_error_case)
   GstElement *pipeline, *src, *filter, *sink;
   GstCaps *caps;
 
+  /* check that there's a usable audio sink (think of build bot case) */
+  sink = gst_element_factory_make ("autoaudiosink", NULL);
+  state_ret = gst_element_set_state (sink, GST_STATE_READY);
+
+  /* need to set state back to NULL, or our test won't work since we
+   * already have detected the real caps in ready and then linking fails */
+  gst_element_set_state (sink, GST_STATE_NULL);
+
+  if (state_ret != GST_STATE_CHANGE_SUCCESS) {
+    GST_WARNING ("No usable audio sink, skipping test");
+    gst_object_unref (sink);
+    return;
+  }
+
   pipeline = gst_pipeline_new ("pipeline");
   src = gst_element_factory_make ("fakesrc", NULL);
   filter = gst_element_factory_make ("capsfilter", NULL);
-  sink = gst_element_factory_make ("autoaudiosink", NULL);
 
   caps = gst_caps_new_simple ("audio/x-raw-int", "width", G_TYPE_INT, 42, NULL);