automake-patches
[Top][All Lists]
Advanced

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

[FYI] tests: avoid some spurious failures on AIX 7.1


From: Stefano Lattarini
Subject: [FYI] tests: avoid some spurious failures on AIX 7.1
Date: Sat, 27 Dec 2014 15:34:23 +0100

* t/lex-noyywrap.sh: Here.
* t/instmany-mans.sh: And here.
* t/instmany-python.sh: And here.
* t/instmany.sh: And here.
* t/parallel-tests-concurrency.sh: And here.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 t/instmany-mans.sh              | 16 +++++++++++-----
 t/instmany-python.sh            | 16 +++++++++++-----
 t/instmany.sh                   | 16 +++++++++++-----
 t/lex-noyywrap.sh               |  7 ++++---
 t/parallel-tests-concurrency.sh | 15 ++++++++++-----
 5 files changed, 47 insertions(+), 23 deletions(-)

diff --git a/t/instmany-mans.sh b/t/instmany-mans.sh
index eb0c9db..0ed2348 100644
--- a/t/instmany-mans.sh
+++ b/t/instmany-mans.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 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
@@ -37,8 +37,6 @@ mkdir x-bin
 
 sed "s|@limit@|$limit|g" >x-bin/my-install <<'END'
 #! /bin/sh
-# Fake install script.  This doesn't really install
-# (the INSTALL path below would be wrong outside this directory).
 address@hidden@
 PATH=$oPATH; export PATH
 if test -z "$orig_INSTALL"; then
@@ -72,8 +70,16 @@ END
 # Creative quoting in the next line to please maintainer-check.
 chmod +x x-bin/'rm' x-bin/my-install
 
-cat > setenv.in <<'END'
-orig_INSTALL='@INSTALL@'; export orig_INSTALL
+cat >setenv.in <<'END'
+orig_INSTALL='@INSTALL@'
+# In case we've falled back on the install-sh script (seen e.g.,
+# on AIX 7.1), we need to make sure we use its absolute path,
+# as we don't know from which directory we'll be run.
+case "$orig_INSTALL" in
+   /*) ;;
+  */*) orig_INSTALL=$(pwd)/$orig_INSTALL;;
+esac
+export orig_INSTALL
 END
 
 cat >>configure.ac <<END
diff --git a/t/instmany-python.sh b/t/instmany-python.sh
index dfcf14b..0088b2d 100644
--- a/t/instmany-python.sh
+++ b/t/instmany-python.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 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
@@ -33,8 +33,6 @@ mkdir x-bin
 
 sed "s|@limit@|$limit|g" >x-bin/my-install <<'END'
 #! /bin/sh
-# Fake install script.  This doesn't really install
-# (the INSTALL path below would be wrong outside this directory).
 address@hidden@
 PATH=$oPATH; export PATH
 if test -z "$orig_INSTALL"; then
@@ -68,8 +66,16 @@ END
 # Creative quoting in the next line to please maintainer-check.
 chmod +x x-bin/'rm' x-bin/my-install
 
-cat > setenv.in <<'END'
-orig_INSTALL='@INSTALL@'; export orig_INSTALL
+cat >setenv.in <<'END'
+orig_INSTALL='@INSTALL@'
+# In case we've falled back on the install-sh script (seen e.g.,
+# on AIX 7.1), we need to make sure we use its absolute path,
+# as we don't know from which directory we'll be run.
+case "$orig_INSTALL" in
+   /*) ;;
+  */*) orig_INSTALL=$(pwd)/$orig_INSTALL;;
+esac
+export orig_INSTALL
 END
 
 cat >>configure.ac <<END
diff --git a/t/instmany.sh b/t/instmany.sh
index 0a479cc..126c93f 100644
--- a/t/instmany.sh
+++ b/t/instmany.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 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
@@ -45,8 +45,6 @@ mkdir x-bin
 
 sed "s|@limit@|$limit|g" >x-bin/my-install <<'END'
 #! /bin/sh
-# Fake install script.  This doesn't really install
-# (the INSTALL path below would be wrong outside this directory).
 address@hidden@
 PATH=$oPATH; export PATH
 if test -z "$orig_INSTALL"; then
@@ -80,8 +78,16 @@ END
 # Creative quoting in the next line to please maintainer-check.
 chmod +x x-bin/'rm' x-bin/my-install
 
-cat > setenv.in <<'END'
-orig_INSTALL='@INSTALL@'; export orig_INSTALL
+cat >setenv.in <<'END'
+orig_INSTALL='@INSTALL@'
+# In case we've falled back on the install-sh script (seen e.g.,
+# on AIX 7.1), we need to make sure we use its absolute path,
+# as we don't know from which directory we'll be run.
+case "$orig_INSTALL" in
+   /*) ;;
+  */*) orig_INSTALL=$(pwd)/$orig_INSTALL;;
+esac
+export orig_INSTALL
 END
 
 cat >>configure.ac <<END
diff --git a/t/lex-noyywrap.sh b/t/lex-noyywrap.sh
index 615a7fc..750f322 100644
--- a/t/lex-noyywrap.sh
+++ b/t/lex-noyywrap.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 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
@@ -69,7 +69,8 @@ if ! cross_compiling; then
   : For shells with busted 'set -e'.
 fi
 
-# Sanity check on distribution.
-yl_distcheck DISTCHECK_CONFIGURE_FLAGS='LEXLIB="none needed"'
+# Sanity check on distribution.  Escape in LEXLIB must use backspace,
+# not double-quotes, to avoid a spurious failure with AIX make.
+yl_distcheck DISTCHECK_CONFIGURE_FLAGS='LEXLIB=none\ needed'
 
 :
diff --git a/t/parallel-tests-concurrency.sh b/t/parallel-tests-concurrency.sh
index 7fbd20e..4a70e23 100644
--- a/t/parallel-tests-concurrency.sh
+++ b/t/parallel-tests-concurrency.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 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
@@ -17,8 +17,8 @@
 # Check parallel-tests features:
 # - concurrent parallel execution
 
-# FIXME: we should factorize the code to determine how to run
-#        make in parallel out in am-test-lib.sh ...
+# FIXME: we should factor out (into am-test-lib.sh?) the code to determine
+#        how to run make in parallel mode ...
 
 . test-init.sh
 
@@ -89,11 +89,16 @@ for build in serial parallel; do
 done
 
 cd serial
-$MAKE ${j}1 check &
-cd ../parallel
+# Do *not* use "make -j1" here; apparently, some make implementations
+# (e.g., AIX 7.1) interpret it as a synonym of "make -j" :-(
+$MAKE check &
+cd ..
+
+cd parallel
 $sleep
 run_make -O -- ${j}4 check
 cd ..
+
 # Ensure the tests are really being run in parallel mode: if this is
 # the case, the serial run of the dummy testsuite started above should
 # still be ongoing when the parallel one has terminated.
-- 
2.1.3




reply via email to

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