Commit 0ce96a49 authored by Debarshi Ray's avatar Debarshi Ray

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.

!79
parent 8a70b969
Pipeline #38622 passed with stage
in 15 minutes and 41 seconds
# 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)
......
......@@ -4,7 +4,7 @@ dogtail_tests = \
basic.py \
$(NULL)
TESTS_ENVIRONMENT += \
AM_TESTS_ENVIRONMENT += \
LC_ALL=C \
GSETTINGS_BACKEND=memory \
$(NULL)
......
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