diff --git a/ChangeLog b/ChangeLog index 187752a8a7..8b60e539ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-02-28 Thomas Vander Stichele + + * tests/check/generic/states.c: (GST_START_TEST): + Copy the states.c test from core again + * tests/check/Makefile.am: + ignore cdio and cdparanoiasrc + 2007-02-28 Stefan Kost * gst/audioconvert/audioconvert.c: (float), (double), (float_hq), diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index 1c6f64385b..7cf3193355 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -7,6 +7,7 @@ REGISTRY_ENVIRONMENT = \ TESTS_ENVIRONMENT = \ CK_DEFAULT_TIMEOUT=120 \ + STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)" \ $(REGISTRY_ENVIRONMENT) \ GST_PLUGIN_SYSTEM_PATH= \ GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(GST_PLUGINS_DIR) @@ -19,6 +20,9 @@ clean-local: clean-local-check $(CHECK_REGISTRY): $(TESTS_ENVIRONMENT) +# elements to ignore for the state tests +STATE_IGNORE_ELEMENTS = cdio cdparanoiasrc + TESTS = $(check_PROGRAMS) if USE_ALSA diff --git a/tests/check/generic/states.c b/tests/check/generic/states.c index 0dc7237ce1..a9f217ec9d 100644 --- a/tests/check/generic/states.c +++ b/tests/check/generic/states.c @@ -33,8 +33,15 @@ GST_START_TEST (test_state_changes) GstElement *element; GList *features, *f; GList *plugins, *p; + gchar **ignorelist = NULL; + const gchar *STATE_IGNORE_ELEMENTS = NULL; GST_DEBUG ("testing elements from source %s", PACKAGE); + STATE_IGNORE_ELEMENTS = g_getenv ("STATE_IGNORE_ELEMENTS"); + if (STATE_IGNORE_ELEMENTS) { + GST_DEBUG ("Will ignore element factories: '%s'", STATE_IGNORE_ELEMENTS); + ignorelist = g_strsplit (STATE_IGNORE_ELEMENTS, " ", 0); + } plugins = gst_registry_get_plugin_list (gst_registry_get_default ()); @@ -51,13 +58,22 @@ GST_START_TEST (test_state_changes) for (f = features; f; f = f->next) { GstPluginFeature *feature = f->data; const gchar *name = gst_plugin_feature_get_name (feature); + gboolean ignore = FALSE; if (!GST_IS_ELEMENT_FACTORY (feature)) continue; - if (g_str_has_prefix (name, "cdparanoia") || - g_str_has_prefix (name, "cdio")) { - continue; + if (ignorelist) { + gchar **s; + + for (s = ignorelist; s && *s; ++s) { + if (g_str_has_prefix (name, *s)) { + GST_DEBUG ("ignoring element %s", name); + ignore = TRUE; + } + } + if (ignore) + continue; } GST_DEBUG ("testing element %s", name); @@ -82,6 +98,7 @@ GST_START_TEST (test_state_changes) gst_object_unref (GST_OBJECT (element)); } } + g_strfreev (ignorelist); } GST_END_TEST;