From b2117398c7701a0006b3e50a7e3598b17a337000 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Thu, 9 May 2002 14:26:20 +0000 Subject: [PATCH] allowing failing tests to be built Original commit message from CVS: allowing failing tests to be built --- configure.ac | 18 ++++++++++++++++-- tests/old/testsuite/clock/clock1.c | 3 ++- tests/old/testsuite/elements/Makefile.am | 16 +++++++++++----- tests/old/testsuite/elements/fake.c | 3 +++ testsuite/clock/clock1.c | 3 ++- testsuite/elements/Makefile.am | 16 +++++++++++----- testsuite/elements/fake.c | 3 +++ 7 files changed, 48 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index e443623..c8573b1 100644 --- a/configure.ac +++ b/configure.ac @@ -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") diff --git a/tests/old/testsuite/clock/clock1.c b/tests/old/testsuite/clock/clock1.c index 6590a77..7728f53 100644 --- a/tests/old/testsuite/clock/clock1.c +++ b/tests/old/testsuite/clock/clock1.c @@ -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); diff --git a/tests/old/testsuite/elements/Makefile.am b/tests/old/testsuite/elements/Makefile.am index 983a56c..15d4b1b 100644 --- a/tests/old/testsuite/elements/Makefile.am +++ b/tests/old/testsuite/elements/Makefile.am @@ -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) diff --git a/tests/old/testsuite/elements/fake.c b/tests/old/testsuite/elements/fake.c index d94aab5..a445b72 100644 --- a/tests/old/testsuite/elements/fake.c +++ b/tests/old/testsuite/elements/fake.c @@ -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")); diff --git a/testsuite/clock/clock1.c b/testsuite/clock/clock1.c index 6590a77..7728f53 100644 --- a/testsuite/clock/clock1.c +++ b/testsuite/clock/clock1.c @@ -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); diff --git a/testsuite/elements/Makefile.am b/testsuite/elements/Makefile.am index 983a56c..15d4b1b 100644 --- a/testsuite/elements/Makefile.am +++ b/testsuite/elements/Makefile.am @@ -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) diff --git a/testsuite/elements/fake.c b/testsuite/elements/fake.c index d94aab5..a445b72 100644 --- a/testsuite/elements/fake.c +++ b/testsuite/elements/fake.c @@ -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")); -- 2.7.4