automake-commit
[Top][All Lists]
Advanced

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

[automake-commit] branch master updated: tests: clear autotools env vars


From: Mike Frysinger
Subject: [automake-commit] branch master updated: tests: clear autotools env vars
Date: Mon, 24 Jan 2022 22:03:46 -0500

This is an automated email from the git hooks/post-receive script.

vapier pushed a commit to branch master
in repository automake.

View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=cd995fe624f2efe9fa2ba0e8c8a89fa0f57d32bb

The following commit(s) were added to refs/heads/master by this push:
     new cd995fe62 tests: clear autotools env vars
cd995fe62 is described below

commit cd995fe624f2efe9fa2ba0e8c8a89fa0f57d32bb
Author: Mike Frysinger <vapier@gentoo.org>
AuthorDate: Mon Jan 24 01:02:41 2022 -0500

    tests: clear autotools env vars
    
    Fixes automake bug https://bugs.gnu.org/16714.
    
    The testsuite will try and retain these env vars when recursively
    running itself, but doesn't distinguish between vars coming from
    the env where the tests were launched.  This breaks if the user
    happens to `export ACLOCAL=alocal` before `make check`.
    
    This gets a little more confusing in that the Makefile appears to
    export these already:
    ACLOCAL = ".../automake/pre-inst-env" aclocal-1.16
    
    In reality, while those are set in the make execution environment,
    they aren't exported into the process environment, so children
    (i.e. shell processes in make rules) don't have them set.  That's
    why tests work for most people today.
    
    However, if the user has first exported "ACLOCAL" in the parent
    make environment (regardless of value), then make's value will
    reset the process environment, and then that will leak into the
    children.  That's why we see errors that look like the makefile
    env vars are leaking for these people.
    
    At any rate, the fix is to update the test harness to clear these
    vars that the test suite relies upon, especially the ones that are
    also set in the Makefiles.  That includes AUTOUPDATE even though
    it currently isn't used inside any of the tests.
    
    * t/local.mk: Add ACLOCAL, AUTOCONF, AUTOHEADER, AUTOMAKE, and
    AUTOUPDATE to the env unset list.
    * t/ax/runtest.in: Likewise.
---
 t/ax/runtest.in | 5 +++++
 t/local.mk      | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/t/ax/runtest.in b/t/ax/runtest.in
index 499b85299..91a5afd52 100644
--- a/t/ax/runtest.in
+++ b/t/ax/runtest.in
@@ -45,6 +45,11 @@ export srcdir
 # test scripts, but not from the environment.
 # Keep this in sync with the 'Makefile.am:AM_TESTS_ENVIRONMENT'.
 for v in \
+  ACLOCAL \
+  AUTOCONF \
+  AUTOHEADER \
+  AUTOMAKE \
+  AUTOUPDATE \
   required \
   am_test_protocol \
   am_serial_tests \
diff --git a/t/local.mk b/t/local.mk
index 31d43e868..8a7cab3b2 100644
--- a/t/local.mk
+++ b/t/local.mk
@@ -42,6 +42,11 @@ TESTS =
 # Keep this in sync with the similar list in ax/runtest.in.
 AM_TESTS_ENVIRONMENT = \
   for v in \
+    ACLOCAL \
+    AUTOCONF \
+    AUTOHEADER \
+    AUTOMAKE \
+    AUTOUPDATE \
     required \
     am_test_protocol \
     am_serial_tests \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]