Commit eb6d2476 authored by Thomas Vander Stichele's avatar Thomas Vander Stichele
Browse files

tests/check/generic/states.c: Copy the states.c test from core again

Original commit message from CVS:
* tests/check/generic/states.c: (GST_START_TEST):
Copy the states.c test from core again
* tests/check/Makefile.am:
ignore cdio and cdparanoiasrc
parent 14cd6e6a
2007-02-28 Thomas Vander Stichele <thomas at apestaart dot org>
* 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 <ensonic@users.sf.net> 2007-02-28 Stefan Kost <ensonic@users.sf.net>
   
* gst/audioconvert/audioconvert.c: (float), (double), (float_hq), * gst/audioconvert/audioconvert.c: (float), (double), (float_hq),
...@@ -7,6 +7,7 @@ REGISTRY_ENVIRONMENT = \ ...@@ -7,6 +7,7 @@ REGISTRY_ENVIRONMENT = \
TESTS_ENVIRONMENT = \ TESTS_ENVIRONMENT = \
CK_DEFAULT_TIMEOUT=120 \ CK_DEFAULT_TIMEOUT=120 \
STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)" \
$(REGISTRY_ENVIRONMENT) \ $(REGISTRY_ENVIRONMENT) \
GST_PLUGIN_SYSTEM_PATH= \ GST_PLUGIN_SYSTEM_PATH= \
GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(GST_PLUGINS_DIR) GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(GST_PLUGINS_DIR)
...@@ -19,6 +20,9 @@ clean-local: clean-local-check ...@@ -19,6 +20,9 @@ clean-local: clean-local-check
$(CHECK_REGISTRY): $(CHECK_REGISTRY):
$(TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
# elements to ignore for the state tests
STATE_IGNORE_ELEMENTS = cdio cdparanoiasrc
TESTS = $(check_PROGRAMS) TESTS = $(check_PROGRAMS)
if USE_ALSA if USE_ALSA
......
...@@ -33,8 +33,15 @@ GST_START_TEST (test_state_changes) ...@@ -33,8 +33,15 @@ GST_START_TEST (test_state_changes)
GstElement *element; GstElement *element;
GList *features, *f; GList *features, *f;
GList *plugins, *p; GList *plugins, *p;
gchar **ignorelist = NULL;
const gchar *STATE_IGNORE_ELEMENTS = NULL;
GST_DEBUG ("testing elements from source %s", PACKAGE); 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 ()); plugins = gst_registry_get_plugin_list (gst_registry_get_default ());
...@@ -51,13 +58,22 @@ GST_START_TEST (test_state_changes) ...@@ -51,13 +58,22 @@ GST_START_TEST (test_state_changes)
for (f = features; f; f = f->next) { for (f = features; f; f = f->next) {
GstPluginFeature *feature = f->data; GstPluginFeature *feature = f->data;
const gchar *name = gst_plugin_feature_get_name (feature); const gchar *name = gst_plugin_feature_get_name (feature);
gboolean ignore = FALSE;
if (!GST_IS_ELEMENT_FACTORY (feature)) if (!GST_IS_ELEMENT_FACTORY (feature))
continue; continue;
if (g_str_has_prefix (name, "cdparanoia") || if (ignorelist) {
g_str_has_prefix (name, "cdio")) { gchar **s;
continue;
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); GST_DEBUG ("testing element %s", name);
...@@ -82,6 +98,7 @@ GST_START_TEST (test_state_changes) ...@@ -82,6 +98,7 @@ GST_START_TEST (test_state_changes)
gst_object_unref (GST_OBJECT (element)); gst_object_unref (GST_OBJECT (element));
} }
} }
g_strfreev (ignorelist);
} }
GST_END_TEST; GST_END_TEST;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment