[gjs] tests: Use $(pkglibexecdir)/installed-tests/gjs for installed test stuff



commit eedf31878a3358f90993c57a0db574dddb7bdddc
Author: Colin Walters <walters verbum org>
Date:   Wed May 22 20:56:28 2013 -0400

    tests: Use $(pkglibexecdir)/installed-tests/gjs for installed test stuff
    
    Per the standard https://live.gnome.org/GnomeGoals/InstalledTests

 Makefile-insttest.am           |   26 ++++++++++++++------------
 installed-tests/gjs-unit.c     |    4 ++--
 installed-tests/jsunit.test.in |    2 +-
 3 files changed, 17 insertions(+), 15 deletions(-)
---
diff --git a/Makefile-insttest.am b/Makefile-insttest.am
index 388c127..774c661 100644
--- a/Makefile-insttest.am
+++ b/Makefile-insttest.am
@@ -7,15 +7,17 @@ endif
 jsunit.test: installed-tests/jsunit.test.in Makefile
        sed -e s,@pkglibexecdir\@,$(pkglibexecdir), < $< > $  tmp && mv $  tmp $@
 
-gjsalltestsdir = $(pkglibexecdir)/tests
-gjsalltests_PROGRAMS = 
+gjsinsttestdir = $(pkglibexecdir)/installed-tests
+gjsinsttest_PROGRAMS = 
 if BUILDOPT_INSTALL_TESTS
-gjsalltests_PROGRAMS += jsunit
+gjsinsttest_PROGRAMS += jsunit
 endif
 
 TEST_PROGS += jsunit
 
-jsunit_CPPFLAGS = $(AM_CPPFLAGS) -DPKGLIBDIR=\"$(pkglibdir)\"
+TEST_INTROSPECTION_GIRS =
+
+jsunit_CPPFLAGS = $(AM_CPPFLAGS) -DPKGLIBDIR=\"$(pkglibdir)\" -DINSTTESTDIR=\"$(gjsinsttestdir)\"
 jsunit_CFLAGS = $(AM_CFLAGS) $(GJS_CFLAGS) -I$(top_srcdir)
 jsunit_LDADD = $(GJS_LIBS) libgjs.la
 jsunit_LDFLAGS = -rpath $(pkglibdir)
@@ -53,32 +55,32 @@ Regress-1.0.gir: libregress.la
 Regress_1_0_gir_LIBS = libregress.la
 Regress_1_0_gir_FILES = $(nodist_libregress_la_SOURCES)
 Regress_1_0_gir_SCANNERFLAGS = --warn-all --warn-error $(libregress_scannerflags_includes) 
$(libregress_la_CPPFLAGS)
-INTROSPECTION_GIRS += Regress-1.0.gir
+TEST_INTROSPECTION_GIRS += Regress-1.0.gir
 
 WarnLib-1.0.gir: libwarnlib.la
 WarnLib_1_0_gir_LIBS = libwarnlib.la
 WarnLib_1_0_gir_INCLUDES = Gio-2.0
 WarnLib_1_0_gir_FILES = $(nodist_libwarnlib_la_SOURCES)
 WarnLib_1_0_gir_SCANNERFLAGS = --c-include="warnlib.h" --symbol-prefix=warnlib_
-INTROSPECTION_GIRS += WarnLib-1.0.gir
+TEST_INTROSPECTION_GIRS += WarnLib-1.0.gir
 
 GIMarshallingTests-1.0.gir: libgimarshallingtests.la
 GIMarshallingTests_1_0_gir_LIBS = libgimarshallingtests.la
 GIMarshallingTests_1_0_gir_INCLUDES = Gio-2.0
 GIMarshallingTests_1_0_gir_FILES = $(nodist_libgimarshallingtests_la_SOURCES)
 GIMarshallingTests_1_0_gir_SCANNERFLAGS = --symbol-prefix=gi_marshalling_tests --warn-all --warn-error
-INTROSPECTION_GIRS += GIMarshallingTests-1.0.gir
+TEST_INTROSPECTION_GIRS += GIMarshallingTests-1.0.gir
 
-privtypelibdir = $(pkglibdir)
-privtypelib_DATA =
+gjsinsttest_DATA =
 noinst_DATA =
 if BUILDOPT_INSTALL_TESTS
-privtypelib_DATA += $(INTROSPECTION_GIRS:.gir=.typelib)
+$(foreach gir,$(TEST_INTROSPECTION_GIRS),$(eval $(call introspection-scanner,$(gir))))
+gjsinsttest_DATA += $(TEST_INTROSPECTION_GIRS:.gir=.typelib)
 else
-noinst_DATA += $(INTROSPECTION_GIRS:.gir=.typelib)
+noinst_DATA += $(TEST_INTROSPECTION_GIRS:.gir=.typelib)
 endif
 
-jstestsdir = $(pkglibdir)/js
+jstestsdir = $(gjsinsttestdir)/js
 jstests_DATA =
 if BUILDOPT_INSTALL_TESTS
 jstests_DATA += \
diff --git a/installed-tests/gjs-unit.c b/installed-tests/gjs-unit.c
index 43925ec..5fa10f0 100644
--- a/installed-tests/gjs-unit.c
+++ b/installed-tests/gjs-unit.c
@@ -115,8 +115,8 @@ main(int argc, char **argv)
         /* typelib path is handled by the environment */
         js_test_dir = g_build_filename("installed-tests", "js", NULL);
     } else {
-        g_irepository_prepend_search_path(PKGLIBDIR);
-        js_test_dir = g_build_filename(PKGLIBDIR, "js", NULL);
+        g_irepository_prepend_search_path(INSTTESTDIR);
+        js_test_dir = g_build_filename(INSTTESTDIR, "js", NULL);
     }
 
     all_tests = read_all_dir_sorted(js_test_dir);
diff --git a/installed-tests/jsunit.test.in b/installed-tests/jsunit.test.in
index 67e992c..2b2f466 100644
--- a/installed-tests/jsunit.test.in
+++ b/installed-tests/jsunit.test.in
@@ -1,2 +1,2 @@
 [Test]
-Exec= pkglibexecdir@/tests/jsunit
+Exec= pkglibexecdir@/installed-tests/jsunit


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