allowing failing tests to be built
authorThomas Vander Stichele <thomas@apestaart.org>
Thu, 9 May 2002 14:26:20 +0000 (14:26 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Thu, 9 May 2002 14:26:20 +0000 (14:26 +0000)
Original commit message from CVS:
allowing failing tests to be built

configure.ac
tests/old/testsuite/clock/clock1.c
tests/old/testsuite/elements/Makefile.am
tests/old/testsuite/elements/fake.c
testsuite/clock/clock1.c
testsuite/elements/Makefile.am
testsuite/elements/fake.c

index e443623..c8573b1 100644 (file)
@@ -225,6 +225,9 @@ esac],
 
 AS_AC_EXPAND(GST_CONFIG_DIR, $GST_CONFIG_DIR)
 AC_MSG_NOTICE(Using $GST_CONFIG_DIR as configuration dir)
+
+
+dnl building of tests
 AC_ARG_ENABLE(tests,
 AC_HELP_STRING([--disable-tests][disable building test apps]),
 [case "${enableval}" in
@@ -233,6 +236,18 @@ AC_HELP_STRING([--disable-tests][disable building test apps]),
   *) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
 esac], 
 [BUILD_TESTS=yes]) dnl Default value
+AM_CONDITIONAL(BUILD_TESTS,         test "x$BUILD_TESTS" = "xyes")
+
+dnl tests known to fail
+AC_ARG_ENABLE(failing-tests,
+AC_HELP_STRING([--disable-failing-tests][disable building tests known to fail]),
+[case "${enableval}" in
+  yes) BUILD_FAILING_TESTS=yes ;;
+  no)  BUILD_FAILING_TESTS=no ;;
+  *) AC_MSG_ERROR(bad value ${enableval} for --disable-failing-tests) ;;
+esac], 
+[BUILD_FAILING_TESTS=yes]) dnl Default value
+AM_CONDITIONAL(BUILD_FAILING_TESTS, test "x$BUILD_FAILING_TESTS" = "xyes")
 
 AC_ARG_ENABLE(examples,
 AC_HELP_STRING([--disable-examples][disable building examples]),
@@ -242,6 +257,7 @@ AC_HELP_STRING([--disable-examples][disable building examples]),
   *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
 esac], 
 [BUILD_EXAMPLES=yes]) dnl Default value
+AM_CONDITIONAL(BUILD_EXAMPLES,      test "x$BUILD_EXAMPLES" = "xyes")
 
 dnl Next, check for the optional components:
 dnl ========================================
@@ -307,8 +323,6 @@ AM_CONDITIONAL(EXPERIMENTAL,        test "$EXPERIMENTAL" = "$xyes")
 AM_CONDITIONAL(BROKEN,              test "$BROKEN" = "$xyes")
 
 AM_CONDITIONAL(HAVE_NASM,           test "x$HAVE_NASM" = "xyes")
-AM_CONDITIONAL(BUILD_TESTS,         test "x$BUILD_TESTS" = "xyes")
-AM_CONDITIONAL(BUILD_EXAMPLES,      test "x$BUILD_EXAMPLES" = "xyes")
 AM_CONDITIONAL(PLUGINS_USE_BUILDDIR,  test "x$PLUGINS_USE_BUILDDIR" = "xyes")
 
 
index 6590a77..7728f53 100644 (file)
@@ -53,13 +53,14 @@ main (int argc, char *argv[])
   clock = gst_bin_get_clock (GST_BIN (pipeline));
   g_assert (clock != NULL);
   gst_clock_debug (clock);
-  gst_clock_set_active (clock, TRUE);
+  //gst_clock_set_active (clock, TRUE);
   gst_clock_debug (clock);
   //clock = gst_clock_new ("clock");
   //gst_element_set_clock (src, clock);
   //clock = gst_element_get_clock (src);
   //g_assert (clock != NULL);
 
+  gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
   gst_bin_iterate (GST_BIN (pipeline));
   gst_clock_debug (clock);
   gst_clock_debug (clock);
index 983a56c..15d4b1b 100644 (file)
@@ -1,11 +1,17 @@
-GST_PLUGIN_PATH=$(shell cd $(top_builddir) && pwd)
-TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=$(GST_PLUGIN_PATH)/testsuite/test-registry.xml
+if BUILD_FAILING_TESTS
+tests_failing = tee
+else
+tests_failing =
+endif
+tests_working = fake name
 
-testprogs = tee fake name
+## GST_PLUGIN_PATH=$(shell cd $(top_builddir) && pwd)
 
-TESTS = $(testprogs)
+## TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=$(GST_PLUGIN_PATH)/testsuite/test-registry.xml
 
-check_PROGRAMS = $(testprogs)
+TESTS = $(tests_failing) $(tests_working)
+
+check_PROGRAMS = $(tests_failing) $(tests_working)
 
 EXTRA_DIST = property.h
 LDADD = $(GST_LIBS) 
index d94aab5..a445b72 100644 (file)
@@ -55,6 +55,9 @@ main (int argc, char *argv[])
 
   /* connect */
   g_print ("Connecting elements\n");
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+  gst_bin_iterate (GST_BIN (pipeline));
+
   gst_pad_connect (gst_element_get_pad (src, "src"),
                   gst_element_get_pad (sink, "sink"));
    
index 6590a77..7728f53 100644 (file)
@@ -53,13 +53,14 @@ main (int argc, char *argv[])
   clock = gst_bin_get_clock (GST_BIN (pipeline));
   g_assert (clock != NULL);
   gst_clock_debug (clock);
-  gst_clock_set_active (clock, TRUE);
+  //gst_clock_set_active (clock, TRUE);
   gst_clock_debug (clock);
   //clock = gst_clock_new ("clock");
   //gst_element_set_clock (src, clock);
   //clock = gst_element_get_clock (src);
   //g_assert (clock != NULL);
 
+  gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
   gst_bin_iterate (GST_BIN (pipeline));
   gst_clock_debug (clock);
   gst_clock_debug (clock);
index 983a56c..15d4b1b 100644 (file)
@@ -1,11 +1,17 @@
-GST_PLUGIN_PATH=$(shell cd $(top_builddir) && pwd)
-TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=$(GST_PLUGIN_PATH)/testsuite/test-registry.xml
+if BUILD_FAILING_TESTS
+tests_failing = tee
+else
+tests_failing =
+endif
+tests_working = fake name
 
-testprogs = tee fake name
+## GST_PLUGIN_PATH=$(shell cd $(top_builddir) && pwd)
 
-TESTS = $(testprogs)
+## TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=$(GST_PLUGIN_PATH)/testsuite/test-registry.xml
 
-check_PROGRAMS = $(testprogs)
+TESTS = $(tests_failing) $(tests_working)
+
+check_PROGRAMS = $(tests_failing) $(tests_working)
 
 EXTRA_DIST = property.h
 LDADD = $(GST_LIBS) 
index d94aab5..a445b72 100644 (file)
@@ -55,6 +55,9 @@ main (int argc, char *argv[])
 
   /* connect */
   g_print ("Connecting elements\n");
+  gst_element_set_state (pipeline, GST_STATE_PLAYING);
+  gst_bin_iterate (GST_BIN (pipeline));
+
   gst_pad_connect (gst_element_get_pad (src, "src"),
                   gst_element_get_pad (sink, "sink"));