automake-ng
[Top][All Lists]
Advanced

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

[Automake-ng] [FYI] [ng] tests: remove some workarounds for non-GNU make


From: Stefano Lattarini
Subject: [Automake-ng] [FYI] [ng] tests: remove some workarounds for non-GNU make
Date: Sat, 14 Apr 2012 10:42:04 +0200

* t/makej2.sh: Adjust heading comments.  Don't check whether $MAKE
groks the '-j' option: GNU make is assured to do so.
* t/check-concurrency-bug9245.sh: Likewise.  Fix botched indentation
since we are at it.
* t/remake4.sh: Adjust heading comments.
* t/parallel-tests6.sh: Likewise.
* t/deleted-am.sh: Remove extra '$sleep' call required to work around
a bug of FreeBSD make.
* t/colon6.test: Remove a workaround needed by HP-UX make.
* t/spy.test: Likewise.  Uncomment the part of the checks that still
wasn't portable to BSD make.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 t/check-concurrency-bug9245.sh |   11 +++++------
 t/colon6.sh                    |    5 -----
 t/deleted-am.sh                |    2 --
 t/makej2.sh                    |    3 ++-
 t/parallel-tests6.sh           |    1 -
 t/remake4.sh                   |    4 +++-
 t/spy.sh                       |   14 ++++++--------
 7 files changed, 16 insertions(+), 24 deletions(-)

diff --git a/t/check-concurrency-bug9245.sh b/t/check-concurrency-bug9245.sh
index 8c9dc53..c2d3d53 100755
--- a/t/check-concurrency-bug9245.sh
+++ b/t/check-concurrency-bug9245.sh
@@ -14,8 +14,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Look for a bug where FreeBSD make in concurrent mode reported success
-# even when the Automake-generated parallel testsuite harness failed.
+# Look for a bug where make in concurrent mode reported success even
+# when the Automake-generated parallel testsuite harness failed.
+# This issue was originally present only with FreeBSD make, but we
+# keep the test anyway, for extra safety.
 # See automake bug#9245.
 
 . ./defs || Exit 1
@@ -42,12 +44,9 @@ $AUTOMAKE -a
 
 ./configure
 
-# Some make implementations don't grok the '-j' option.
-$MAKE -j1 || Exit 77
-
 for j in '' -j1 -j2; do
   $MAKE $j check && Exit 1
-   $MAKE $j TESTS=foo.test check && Exit 1
+  $MAKE $j TESTS=foo.test check && Exit 1
   if test x"$am_parallel_tests" = x"yes"; then
     $MAKE $j recheck && Exit 1
     $MAKE $j TEST_LOGS=foo.log check && Exit 1
diff --git a/t/colon6.sh b/t/colon6.sh
index 9f14d2a..09cc2eb 100755
--- a/t/colon6.sh
+++ b/t/colon6.sh
@@ -60,11 +60,6 @@ for vpath in : false; do
   cd demo
 
   $sleep
-  # HP-UX make considers targets with exact time stamps as one of their
-  # prerequisites out of date.  Ensure Makefile is newer than config.status to
-  # avoid triggering the am--refresh rule in the (here-nonexistent) toplevel
-  # Makefile.
-  touch Makefile
 
   # version.good should depend on version.gin.
   echo "Rebuilt (srcdir=$srcdir)" > ../$srcdir/demo/version.gin
diff --git a/t/deleted-am.sh b/t/deleted-am.sh
index 636286c..e8e7a22 100755
--- a/t/deleted-am.sh
+++ b/t/deleted-am.sh
@@ -35,7 +35,6 @@ $AUTOMAKE
 $MAKE
 
 rm -f zardoz.am
-$sleep # Required to avoid racy failures with FreeBSD make.
 $MAKE >output 2>&1 && { cat output; Exit 1; }
 cat output
 # This error will come from automake, not make, so we can be stricter
@@ -49,7 +48,6 @@ $AUTOMAKE Makefile
 ./config.status Makefile
 $MAKE # Sanity check.
 rm -f foobar.am
-$sleep # Required to avoid racy failures with FreeBSD make.
 $MAKE >output 2>&1 && { cat output; Exit 1; }
 cat output
 # This error will come from automake, not make, so we can be stricter
diff --git a/t/makej2.sh b/t/makej2.sh
index 8183887..3e89df6 100755
--- a/t/makej2.sh
+++ b/t/makej2.sh
@@ -17,6 +17,8 @@
 # Test to make sure known BSD 'make -jN' issues are fixed:
 # without -B, it may reuse the same shell for separate commands in a
 # rule, which can lead to interesting results.
+# Problems like this shouldn't happen with GNU make, but we keep the
+# test anyway for the moment, for extra safety.
 
 . ./defs || Exit 1
 
@@ -37,7 +39,6 @@ mkdir build
 cd build
 ../configure "--prefix=`pwd`/inst"
 
-$MAKE -j2 || skip_ "$MAKE failed to run with two parallel jobs"
 $MAKE -j2 distcheck
 $MAKE test-distdir-removed
 
diff --git a/t/parallel-tests6.sh b/t/parallel-tests6.sh
index eee6538..6003295 100755
--- a/t/parallel-tests6.sh
+++ b/t/parallel-tests6.sh
@@ -16,7 +16,6 @@
 
 # Check parallel-tests features:
 # - empty TESTS
-# BSD make will expand '$(TESTS:=.log)' to '.log' unless overridden.
 # See parallel-tests10.test for a similar issue.
 
 am_parallel_tests=yes
diff --git a/t/remake4.sh b/t/remake4.sh
index 43f8569..c43a535 100755
--- a/t/remake4.sh
+++ b/t/remake4.sh
@@ -21,7 +21,9 @@
 #
 # If this fails, this is likely to be due to a dependency being
 # given two different name.  For instance BSD Make does not know
-# that 'Makefile' is the same as './Makefile'
+# that 'Makefile' is the same as './Makefile'.  This shouldn't
+# happen with GNU make, but we keep the test anyway, for extra
+# safety.
 #
 # Report from Akim Demaille.
 
diff --git a/t/spy.sh b/t/spy.sh
index 0d087a4..3530328 100755
--- a/t/spy.sh
+++ b/t/spy.sh
@@ -85,8 +85,6 @@ $sleep
 touch b
 $MAKE
 test "`cat a`" = rule1
-# Ensure a is strictly newer than b, so HP-UX make does not execute rule2.
-$sleep
 : > a
 $sleep
 touch c
@@ -96,11 +94,11 @@ test "`cat a`" = rule2
 # Unfortunately, the following is not portable to FreeBSD/NetBSD/OpenBSD
 # make, see explanation above.
 
-#: > a
-#$sleep
-#touch b c
-#$MAKE
-#grep rule1 a
-#grep rule2 a
+: > a
+$sleep
+touch b c
+$MAKE
+grep rule1 a
+grep rule2 a
 
 :
-- 
1.7.9.5




reply via email to

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