applying http://bugzilla.gnome.org/show_bug.cgi?id=110707 patch, should fix testsuite...
authorThomas Vander Stichele <thomas@apestaart.org>
Sun, 18 May 2003 22:59:51 +0000 (22:59 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Sun, 18 May 2003 22:59:51 +0000 (22:59 +0000)
Original commit message from CVS:
applying
http://bugzilla.gnome.org/show_bug.cgi?id=110707
patch, should fix testsuite issues

19 files changed:
gst/gst.c
tests/old/testsuite/Makefile.am
tests/old/testsuite/caps/Makefile.am
tests/old/testsuite/cleanup/Makefile.am
tests/old/testsuite/clock/Makefile.am
tests/old/testsuite/elements/Makefile.am
tests/old/testsuite/indexers/Makefile.am
tests/old/testsuite/plugin/Makefile.am
tests/old/testsuite/refcounting/Makefile.am
tests/old/testsuite/threads/Makefile.am
testsuite/Makefile.am
testsuite/caps/Makefile.am
testsuite/cleanup/Makefile.am
testsuite/clock/Makefile.am
testsuite/elements/Makefile.am
testsuite/indexers/Makefile.am
testsuite/plugin/Makefile.am
testsuite/refcounting/Makefile.am
testsuite/threads/Makefile.am

index 9697ce2..2451dc9 100644 (file)
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -373,8 +373,15 @@ init_pre (void)
     gst_registry_add_path (_global_registry, PLUGINS_DIR);
 #endif /* PLUGINS_USE_BUILDDIR */
 
-    homedir = g_get_home_dir ();
-    user_reg = g_strjoin ("/", homedir, LOCAL_REGISTRY_FILE, NULL);
+    if (g_getenv ("GST_REGISTRY"))
+    {
+      user_reg = g_strdup (g_getenv ("GST_REGISTRY"));
+    }
+    else
+    {
+      homedir = g_get_home_dir ();
+      user_reg = g_strjoin ("/", homedir, LOCAL_REGISTRY_FILE, NULL);
+    }
     _user_registry = gst_xml_registry_new ("user_registry", user_reg);
 
     g_free (user_reg);
index 3748b1d..9f068af 100644 (file)
@@ -7,8 +7,8 @@ endif
 # FIXME : threads bytestream
 SUBDIRS = caps plugin elements clock refcounting threads indexers $(GST_PARSE_DIRS) ## cleanup dynparams
 
-GST_PLUGIN_PATH = $(shell cd $(top_builddir) && pwd)
-TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=`pwd`/test-registry.xml
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
 
 if BUILD_FAILING_TESTS
 testprogs = test_gst_init
@@ -18,7 +18,10 @@ testprogs =
 inspectcheck = 
 endif
 
-TESTS = $(top_builddir)/tools/gst-register $(testprogs) $(inspectcheck)
+# since these TESTS are only run after recursing into subdirs,
+# gst-register should be run before that, in the first subdir that uses it
+# TESTS = $(top_builddir)/tools/gst-register $(testprogs) $(inspectcheck)
+TESTS = $(testprogs) $(inspectcheck)
 
 check_PROGRAMS = $(testprogs)
 
@@ -27,7 +30,7 @@ LIBS = $(GST_LIBS)
 AM_CFLAGS = $(GST_CFLAGS)
 
 # we makes them, we gots to clean them
-CLEANFILES = test-registry.xml elementstest-registry.xml
+CLEANFILES = test-registry.xml
 
 DIST_SUBDIRS = bytestream caps cleanup clock dynparams elements indexers \
                plugin refcounting threads parse
index 710bddd..8d13f8d 100644 (file)
@@ -1,9 +1,12 @@
-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
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
 
 testprogs = intersection compatibility normalisation string-conversions
 
-TESTS = $(testprogs)
+# we run gst-register here, which is a HACK to generate the test registry
+# before we actually run the real tests
+# a better fix is welcome :)
+TESTS = $(top_builddir)/tools/gst-register $(testprogs)
 
 check_PROGRAMS = $(testprogs)
 
index 9a2bac9..f59c691 100644 (file)
@@ -1,3 +1,6 @@
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
+
 if BUILD_FAILING_TESTS
 FAILING = cleanup3 cleanup4
 else
@@ -6,9 +9,6 @@ endif
 
 testprogs = cleanup1 cleanup2 $(FAILING) cleanup5
 
-GST_PLUGIN_PATH = $(shell cd $(top_builddir) && pwd)
-TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=`pwd`/test-registry.xml
-
 TESTS = $(testprogs)
 
 check_PROGRAMS = $(testprogs)
index 02b252f..21c3ce7 100644 (file)
@@ -1,5 +1,5 @@
-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
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
 
 testprogs = clock1 clock2
 
index c4dd805..af78be0 100644 (file)
@@ -1,3 +1,6 @@
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
+
 if BUILD_FAILING_TESTS
 tests_failing = fake
 else
@@ -5,10 +8,6 @@ tests_failing =
 endif
 tests_working = name tee property
 
-GST_PLUGIN_PATH=$(shell cd $(top_builddir) && pwd)
-
-TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=`pwd`test-registry.xml
-
 TESTS = $(tests_working)
 
 check_PROGRAMS = $(tests_failing) $(tests_working)
index e08c185..e1c8d6e 100644 (file)
@@ -1,3 +1,6 @@
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
+
 testprogs = cache1 indexdump
 
 TESTS = $(testprogs)
index 363c685..7cda5ce 100644 (file)
@@ -1,7 +1,7 @@
-plugindir = $(shell cd $(top_builddir)/testsuite/plugin/ && pwd)
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
 
-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
+plugindir = $(shell cd $(top_builddir)/testsuite/plugin/ && pwd)
 
 plugin_LTLIBRARIES = libtestplugin.la libtestplugin2.la
 
index 0413c20..b7fbe22 100644 (file)
@@ -1,3 +1,6 @@
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
+
 if BUILD_FAILING_TESTS
 tests_failing = element bin element_pad pad
 else
@@ -11,9 +14,6 @@ pad_SOURCES = pad.c mem.c
 element_pad_SOURCES = element_pad.c mem.c
 bin_SOURCES = bin.c mem.c
 
-GST_PLUGIN_PATH = $(shell cd $(top_builddir) && pwd)
-TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=`pwd`/test-registry.xml
-
 TESTS = $(tests_working)
 
 check_PROGRAMS = $(TESTS)
index 0184989..97112c8 100644 (file)
@@ -1,3 +1,6 @@
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
+
 testprogs = thread1 thread2 thread3 thread5 threadb
 testsfailing = threadc threadd threade threadf thread4
 
@@ -7,10 +10,6 @@ check_PROGRAMS = $(testprogs)
 
 noinst_PROGRAMS = $(testsfailing)
 
-GST_PLUGIN_PATH=$(shell cd $(top_builddir) && pwd)
-
-TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=`pwd`test-registry.xml
-
 LDADD = $(GST_LIBS) 
 AM_CFLAGS = $(GST_CFLAGS)
 
index 3748b1d..9f068af 100644 (file)
@@ -7,8 +7,8 @@ endif
 # FIXME : threads bytestream
 SUBDIRS = caps plugin elements clock refcounting threads indexers $(GST_PARSE_DIRS) ## cleanup dynparams
 
-GST_PLUGIN_PATH = $(shell cd $(top_builddir) && pwd)
-TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=`pwd`/test-registry.xml
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
 
 if BUILD_FAILING_TESTS
 testprogs = test_gst_init
@@ -18,7 +18,10 @@ testprogs =
 inspectcheck = 
 endif
 
-TESTS = $(top_builddir)/tools/gst-register $(testprogs) $(inspectcheck)
+# since these TESTS are only run after recursing into subdirs,
+# gst-register should be run before that, in the first subdir that uses it
+# TESTS = $(top_builddir)/tools/gst-register $(testprogs) $(inspectcheck)
+TESTS = $(testprogs) $(inspectcheck)
 
 check_PROGRAMS = $(testprogs)
 
@@ -27,7 +30,7 @@ LIBS = $(GST_LIBS)
 AM_CFLAGS = $(GST_CFLAGS)
 
 # we makes them, we gots to clean them
-CLEANFILES = test-registry.xml elementstest-registry.xml
+CLEANFILES = test-registry.xml
 
 DIST_SUBDIRS = bytestream caps cleanup clock dynparams elements indexers \
                plugin refcounting threads parse
index 710bddd..8d13f8d 100644 (file)
@@ -1,9 +1,12 @@
-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
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
 
 testprogs = intersection compatibility normalisation string-conversions
 
-TESTS = $(testprogs)
+# we run gst-register here, which is a HACK to generate the test registry
+# before we actually run the real tests
+# a better fix is welcome :)
+TESTS = $(top_builddir)/tools/gst-register $(testprogs)
 
 check_PROGRAMS = $(testprogs)
 
index 9a2bac9..f59c691 100644 (file)
@@ -1,3 +1,6 @@
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
+
 if BUILD_FAILING_TESTS
 FAILING = cleanup3 cleanup4
 else
@@ -6,9 +9,6 @@ endif
 
 testprogs = cleanup1 cleanup2 $(FAILING) cleanup5
 
-GST_PLUGIN_PATH = $(shell cd $(top_builddir) && pwd)
-TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=`pwd`/test-registry.xml
-
 TESTS = $(testprogs)
 
 check_PROGRAMS = $(testprogs)
index 02b252f..21c3ce7 100644 (file)
@@ -1,5 +1,5 @@
-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
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
 
 testprogs = clock1 clock2
 
index c4dd805..af78be0 100644 (file)
@@ -1,3 +1,6 @@
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
+
 if BUILD_FAILING_TESTS
 tests_failing = fake
 else
@@ -5,10 +8,6 @@ tests_failing =
 endif
 tests_working = name tee property
 
-GST_PLUGIN_PATH=$(shell cd $(top_builddir) && pwd)
-
-TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=`pwd`test-registry.xml
-
 TESTS = $(tests_working)
 
 check_PROGRAMS = $(tests_failing) $(tests_working)
index e08c185..e1c8d6e 100644 (file)
@@ -1,3 +1,6 @@
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
+
 testprogs = cache1 indexdump
 
 TESTS = $(testprogs)
index 363c685..7cda5ce 100644 (file)
@@ -1,7 +1,7 @@
-plugindir = $(shell cd $(top_builddir)/testsuite/plugin/ && pwd)
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
 
-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
+plugindir = $(shell cd $(top_builddir)/testsuite/plugin/ && pwd)
 
 plugin_LTLIBRARIES = libtestplugin.la libtestplugin2.la
 
index 0413c20..b7fbe22 100644 (file)
@@ -1,3 +1,6 @@
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
+
 if BUILD_FAILING_TESTS
 tests_failing = element bin element_pad pad
 else
@@ -11,9 +14,6 @@ pad_SOURCES = pad.c mem.c
 element_pad_SOURCES = element_pad.c mem.c
 bin_SOURCES = bin.c mem.c
 
-GST_PLUGIN_PATH = $(shell cd $(top_builddir) && pwd)
-TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=`pwd`/test-registry.xml
-
 TESTS = $(tests_working)
 
 check_PROGRAMS = $(TESTS)
index 0184989..97112c8 100644 (file)
@@ -1,3 +1,6 @@
+TOP_BUILDDIR=$(shell cd $(top_builddir) && pwd)
+TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(TOP_BUILDDIR) GST_REGISTRY=$(TOP_BUILDDIR)/testsuite/test-registry.xml
+
 testprogs = thread1 thread2 thread3 thread5 threadb
 testsfailing = threadc threadd threade threadf thread4
 
@@ -7,10 +10,6 @@ check_PROGRAMS = $(testprogs)
 
 noinst_PROGRAMS = $(testsfailing)
 
-GST_PLUGIN_PATH=$(shell cd $(top_builddir) && pwd)
-
-TESTS_ENVIRONMENT = GST_PLUGIN_PATH=$(GST_PLUGIN_PATH) GST_REGISTRY=`pwd`test-registry.xml
-
 LDADD = $(GST_LIBS) 
 AM_CFLAGS = $(GST_CFLAGS)