[gnome-photos/wip/rishi/unit-tests: 1/4] build: Unbreak the environment for the Autotools serial test harness



commit 7a3135b9e75712bf2e52d52bc750016b5af07127
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Nov 14 20:54:42 2018 +0100

    build: Unbreak the environment for the Autotools serial test harness
    
    Autotools' serial test harness uses TESTS_ENVIRONMENT, and doesn't
    support AM_TESTS_ENVIRONMENT [1]. The latest version of glib-tap.mk in
    GLib targets the newer and default parallel test harness, and removing
    the "serial-tests" Automake option breaks the graphical test:
      make[5]: Entering directory
        '/home/rishi/devel/gnome-photos/git/gnome-photos/builddir/tests'
      ERROR: basic.py - missing test plan
      tap-driver.sh: internal error getting exit status
      tap-driver.sh: fatal: I/O or internal error
      make[5]: *** [Makefile:1207: basic.py.log] Error 1
    
    Fortunately, there was no significant breakage because the existing
    test doesn't use APIs like g_test_build_filename, g_test_get_filename,
    and g_test_get_dir, which would have been affected by the missing
    G_TEST_BUILDDIR and G_TEST_SRCDIR environment variables.
    
    Since the Autotools build is deprecated, it's easier to stick to the
    serial harness instead of trying to fix the graphical test to work with
    the parallel setup. Therefore, this partially reverts commit
    0ce96a49daf77d4961bf0e4006d96360219278a6 by re-introducing
    TESTS_ENVIRONMENT instead of AM_TESTS_ENVIRONMENT.
    
    [1] https://www.gnu.org/software/automake/manual/html_node/Serial-Test-Harness.html#Serial-Test-Harness
    
    https://gitlab.gnome.org/GNOME/gnome-photos/merge_requests/80

 glib-tap.mk       | 2 +-
 tests/Makefile.am | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib-tap.mk b/glib-tap.mk
index 927df243..c7742fc1 100644
--- a/glib-tap.mk
+++ b/glib-tap.mk
@@ -1,6 +1,6 @@
 # GLIB - Library of useful C routines
 
-AM_TESTS_ENVIRONMENT= \
+TESTS_ENVIRONMENT= \
        G_TEST_SRCDIR="$(abs_srcdir)"           \
        G_TEST_BUILDDIR="$(abs_builddir)"       \
        G_DEBUG=gc-friendly                     \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2a1a7745..f3f3b201 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -4,7 +4,7 @@ dogtail_tests = \
        basic.py \
        $(NULL)
 
-AM_TESTS_ENVIRONMENT += \
+TESTS_ENVIRONMENT += \
        LC_ALL=C \
        GSETTINGS_BACKEND=memory \
        $(NULL)


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