[gnome-photos/wip/rishi/glib-tap-update-2018] build: Update glib-tap.mk from GLib



commit 519f786327a51313ce4e880e99c724f009b65f2e
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Nov 2 12:38:55 2018 +0100

    build: Update glib-tap.mk from GLib
    
    Use AM_TESTS_ENVIRONMENT rather than TESTS_ENVIRONMENT because the
    former is reserved for the user to set when running the tests; fix a
    misnamed variable; add missing mkdir for .test generation rule because
    it can’t be guaranteed that the builddir actually exists; and use TAP
    for installed tests too.
    
    However, the Type is retained as 'session-exclusive' due to the
    presence of a graphical test.

 glib-tap.mk       | 10 ++++++----
 tests/Makefile.am |  2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/glib-tap.mk b/glib-tap.mk
index de272a7f..927df243 100644
--- a/glib-tap.mk
+++ b/glib-tap.mk
@@ -1,6 +1,6 @@
 # GLIB - Library of useful C routines
 
-TESTS_ENVIRONMENT= \
+AM_TESTS_ENVIRONMENT= \
        G_TEST_SRCDIR="$(abs_srcdir)"           \
        G_TEST_BUILDDIR="$(abs_builddir)"       \
        G_DEBUG=gc-friendly                     \
@@ -112,7 +112,7 @@ if ENABLE_INSTALLED_TESTS
 installed_test_PROGRAMS += $(test_programs) $(installed_test_programs) \
                           $(test_extra_programs) $(installed_test_extra_programs)
 installed_test_SCRIPTS += $(test_scripts) $(installed_test_scripts) \
-                          $(test_extra_scripts) $(test_installed_extra_scripts)
+                          $(test_extra_scripts) $(installed_test_extra_scripts)
 installed_test_SCRIPTS += $(dist_test_scripts) $(dist_test_extra_scripts) \
                           $(dist_installed_test_scripts) $(dist_installed_test_extra_scripts)
 nobase_installed_test_DATA += $(test_data) $(installed_test_data)
@@ -125,9 +125,11 @@ installed_testcases = $(test_programs) $(installed_test_programs) \
 installed_test_meta_DATA = $(installed_testcases:=.test)
 
 %.test: %$(EXEEXT) Makefile
-       $(AM_V_GEN) (echo '[Test]' > $@.tmp; \
+       $(AM_V_GEN) ($(MKDIR_P) $(@D); \
+       echo '[Test]' > $@.tmp; \
        echo 'Type=session-exclusive' >> $@.tmp; \
-       echo 'Exec=$(installed_testdir)/$(notdir $<)' >> $@.tmp; \
+       echo 'Exec=$(installed_testdir)/$(notdir $<) --tap' >> $@.tmp; \
+       echo 'Output=TAP' >> $@.tmp; \
        mv $@.tmp $@)
 
 CLEANFILES += $(installed_test_meta_DATA)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f3f3b201..2a1a7745 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -4,7 +4,7 @@ dogtail_tests = \
        basic.py \
        $(NULL)
 
-TESTS_ENVIRONMENT += \
+AM_TESTS_ENVIRONMENT += \
        LC_ALL=C \
        GSETTINGS_BACKEND=memory \
        $(NULL)


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