automake-patches
[Top][All Lists]
Advanced

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

[PATCH] Testsuite now works with BSD make in parallel mode.


From: Stefano Lattarini
Subject: [PATCH] Testsuite now works with BSD make in parallel mode.
Date: Thu, 10 Jun 2010 23:21:26 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; )

* tests/defs.in: Unset variables __MKLVL__ and MAKE_JOBS_FIFO,
which are exported by BSD make when run in parallel mode, and
which can confuse make processes spawned by our testsuite.
This change fixes a lot of spurious failure when the testsuite
is run with BSD make in parallel mode.
---
 ChangeLog     |    9 +++++++++
 tests/defs.in |    2 +-

-*-*-*-

Without this patch, the automake testsuite reports at least 20
spurious failures when run in parallel mode with freebsd-make on
my debian box.  This is due to a couple of leaked environment
variables, used internally by BSD make: 
  - MAKE_JOBS_FIFO
  - __MKLVL__
(not exactly sure about the second one, but removing it "just to be
sure" should be OK IMO).

Ralf explored some of the parallel BSD make quirks in these old messages:
 <http://lists.gnu.org/archive/html/automake-patches/2009-05/msg00023.html>
 <http://lists.gnu.org/archive/html/automake-patches/2009-05/msg00024.html>

This source code fragment of FreeBSD make can be instructive:
 <http://fxr.googlebit.com/source/usr.bin/make/main.c?v=8-CURRENT>
(this code seems to be the same used in debian package "freebsd-make").

How I run the testsuite using freebsd-make:
 $ cd ~/tmp/src/automake
 $ ./configure && make all
 $ cd tests
 $ MAKE=freebsd-make nice -n19 freebsd-make check -j12 -k

The resulting `test-suite.log' files before and after the patch are attached
(gzipped), for reference.

Regards,
     Stefano
From 89064c43e330e61e163c16de4ccd7fa19c1faa42 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Thu, 10 Jun 2010 19:47:13 +0200
Subject: [PATCH] Testsuite now works with BSD make in parallel mode.

* tests/defs.in: Unset variables __MKLVL__ and MAKE_JOBS_FIFO,
which are exported by BSD make when run in parallel mode, and
which can confuse make processes spawned by our testsuite.
This change fixes a lot of spurious failure when the testsuite
is run with BSD make in parallel mode.
---
 ChangeLog     |    9 +++++++++
 tests/defs.in |    2 +-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8f33b63..888c351 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-06-10  Stefano Lattarini  <address@hidden>
+
+       Testsuite now works with BSD make in parallel mode.
+       * tests/defs.in: Unset variables __MKLVL__ and MAKE_JOBS_FIFO,
+       which are exported by BSD make when run in parallel mode, and
+       which can confuse make processes spawned by our testsuite.
+       This change fixes a lot of spurious failure when the testsuite
+       is run with BSD make in parallel mode.
+
 2010-06-09  Stefano Lattarini  <address@hidden>
 
        Modernize, improve and/or fix various test scripts.
diff --git a/tests/defs.in b/tests/defs.in
index fb056ff..e00aed5 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -308,7 +308,7 @@ cd ./$testSubDir
 # recursively invoked sub-make.  Any $MAKE invocation in a test is
 # conceptually an independent invocation, not part of the main
 # 'automake' build.
-unset MFLAGS MAKEFLAGS MAKELEVEL AM_MAKEFLAGS
+unset MFLAGS MAKEFLAGS AM_MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO
 # Unset verbosity flag.
 unset V
 # Also unset variables that will let `make -e install' divert
-- 
1.6.5

Attachment: after-patch--test-suite.log.gz
Description: GNU Zip compressed data

Attachment: before-patch--test-suite.log.gz
Description: GNU Zip compressed data


reply via email to

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