automake-patches
[Top][All Lists]
Advanced

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

[FYI] {master} tap: some makes in parallel mode unconditionally serializ


From: Stefano Lattarini
Subject: [FYI] {master} tap: some makes in parallel mode unconditionally serialize output
Date: Tue, 17 Jan 2012 14:01:08 +0100

Some make implementations (among them, FreeBSD make, NetBSD make,
and Solaris Distributed Make), when run in parallel mode, serialize
the output from their targets' recipes unconditionally.  This has
the nasty side effect that the user won't see the partial results
of a TAP test until the test has terminated.  This is not something
our TAP driver script can work around unfortunately; in fact, the
driver is sending out its output progressively and "in sync" with
test execution -- it is make that is stowing such output away
instead of presenting it to the user as soon as it gets it.

So we content ourself with working around the issue in our
testsuite, to at least avoid failures we could do nothing to
prevent.

* tests/tap-realtime.test: Skip this test if the make program used
is a non-GNU make running in parallel mode.  And if Sun dmake is
being used, try to force it to run in serial mode, by exporting the
'DMAKE_MODE' environment variable to "serial".
---
 tests/tap-realtime.test |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/tests/tap-realtime.test b/tests/tap-realtime.test
index dd4621c..d30af2e 100755
--- a/tests/tap-realtime.test
+++ b/tests/tap-realtime.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,6 +35,23 @@ expect -f expect-check || {
 }
 rm -f expect-check
 
+# Unfortunately, some make implementations (among them, FreeBSD make,
+# NetBSD make, and Solaris Distributed make), when run in parallel mode,
+# serialize the output from their targets' recipes unconditionally.  In
+# such a situation, there's no way the partial results of a TAP test can
+# be displayed until the test has terminated.  And this is not something
+# our TAP driver script can work around; in fact, the driver *is* sending
+# out its output progressively and "in sync" with test execution -- it is
+# make that is stowing such output away instead of presenting it to the
+# user as soon as it gets it.
+if using_gmake; then :; else
+  case $MAKE in
+    *\ -j*) skip_ "doesn't with non-GNU concurrent make";;
+  esac
+  # Prevent Sun Distributed Make from trying to run in parallel.
+  DMAKE_MODE=serial; export DMAKE_MODE
+fi
+
 cat > Makefile.am << 'END'
 TESTS = all.test
 END
@@ -44,7 +61,7 @@ cat > all.test <<'END'
 #! /bin/sh
 echo 1..3
 
-# Creative quoting to placate maintainer-check
+# Creative quoting to placate maintainer-check.
 sleep="sleep "3
 
 # The awk+shell implementation of the TAP driver must "read ahead" of one
-- 
1.7.7.3




reply via email to

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