]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: fix spurious failure in backcompat2.test on NetBSD
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 2 Jun 2011 12:40:19 +0000 (14:40 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 2 Jun 2011 12:40:19 +0000 (14:40 +0200)
* tests/backcompat2.test: Add trailing `:' in the body of a `for'
loop, in case the last command there might have an exit status
different 0.  This work around `set -e' issues in some BSD shells,
e.g., NetBSD /bin/ksh.

ChangeLog
tests/backcompat2.test

index 52d81f7c52d547bc15bd4bbf5f497415538c0153..9ec908313bd7eed77e240d0ccb757aba74aed1f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-06-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix spurious failure in backcompat2.test on NetBSD
+       * tests/backcompat2.test: Add trailing `:' in the body of a `for'
+       loop, in case the last command there might have an exit status
+       different 0.  This work around `set -e' issues in some BSD shells,
+       e.g., NetBSD /bin/ksh.
+
 2011-06-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests: fix spurious failure in autohdr3.test
index 98336eac95ee2a80b230ab8a318bca261ac21db5..5be6aec477410d292932de73dc9951a068262ce5 100755 (executable)
@@ -45,6 +45,11 @@ END
   # The non-empty third argument should prevent PACKAGE and VERSION
   # from being AC_DEFINE'd.
   $EGREP 'pkg(name|version)' config.h && Exit 1
+  # This is required because even relatively-recent versions of the
+  # BSD shell wrongly exit when the `errexit' shell flag is active if
+  # the last command of a compound statement fails, even if it should
+  # be protected by the use of "&&".
+  :
 done
 
 for am_extra_args in '' ',' ', []'; do