[glib] Convert more tests to installed tests



commit 1808888a1f543276f83d65ef41a5cadb5f31c388
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon May 20 21:05:56 2013 -0400

    Convert more tests to installed tests

 tests/gobject/Makefile.am |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
index e766b7a..b0125a1 100644
--- a/tests/gobject/Makefile.am
+++ b/tests/gobject/Makefile.am
@@ -75,6 +75,20 @@ TESTS_ENVIRONMENT = srcdir=$(srcdir) \
        MALLOC_CHECK_=2 \
        MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
 
+if BUILDOPT_INSTALL_TESTS
+insttestdir = $(pkglibexecdir)/installed-tests
+insttest_PROGRAMS = $(test_programs)
+
+testmetadir = $(datadir)/installed-tests/$(PACKAGE)
+testmeta_DATA = $(test_programs:=.test)
+
+%.test: % Makefile
+       $(AM_V_GEN) (echo '[Test]' > $  tmp; \
+        echo 'Type=session' >> $  tmp; \
+        echo 'Exec=env G_TEST_DATA=$(pkglibexecdir)/installed-tests $(pkglibexecdir)/installed-tests/$<' >> 
$  tmp; \
+        mv $  tmp $@)
+endif
+
 ########################################################################
 
 EXTRA_DIST +=            \
@@ -94,3 +108,5 @@ distclean-local:
        if test $(srcdir) = .; then :; else     \
            rm -f $(BUILT_EXTRA_DIST);          \
        fi
+
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]