summaryrefslogtreecommitdiff
path: root/t/parallel-am3.sh
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-05-17 13:45:44 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-05-17 15:40:35 +0200
commit84e12c32964ef8454be946b4b2eeb46766ca9add (patch)
treeb397fb95a2b599f73e9fc19e228178881c0c3ce9 /t/parallel-am3.sh
parent176d229b5136806a6f34d18f08dfc986e6c26c76 (diff)
downloadautomake-84e12c32964ef8454be946b4b2eeb46766ca9add.tar.gz
tests: sanitize 'unset' usages
In some shells (e.g., Solaris 10 /bin/ksh, or NetBSD 5.1 /bin/sh), "unset VAR" returns a non-zero exit status in case the VAR variable is already unset. This doesn't interact well with our usage of "set -e" in the testsuite. So far, we've avoided spurious failures by either explicitly ignoring the exit status from unset: unset VAR || : or explicitly ensuring that a variable is set, before trying to unset it: VAR=; unset VAR But we can do better, by aliasing the 'unset' command to a custom function that will take care of these details for us. This will avoid us annoying spurious failures in the future, failures that have already bitten us too much times. For an example, refer to commit 'v1.12.2-88-g5b1dae5' of 2012-08-05 (tests: avoid tons of spurious failures on NetBSD). * t/ax/test-lib.sh (_am_unset): New function. (unset): New alias to it. (_am_exit): Adjust comments. * t/ax/am-test-lib.sh: No need to temporary disable the 'errexit' shell flag when unsetting variables that are potentially already unset. (am_process_requirements): Adjust to remove a now-useless workaround related to unset. * t/aclocal-macrodir.tap: Likewise. * t/aclocal-macrodirs.tap: Likewise. * t/auxdir-autodetect.sh: Likewise. * t/ax/am-test-lib.sh: Likewise. * t/ax/test-lib.sh: Likewise. * t/check-tests-in-builddir.sh: Likewise. * t/dist-formats.tap: Likewise. * t/distcheck-configure-flags-am.sh: Likewise. * t/distcheck-configure-flags.sh: Likewise. * t/java-empty-classpath.sh: Likewise. * t/javaflags.sh: Likewise. * t/lflags.sh: Likewise. * t/lflags2.sh: Likewise. * t/lisp-flags.sh: Likewise. * t/lisp6.sh: Likewise. * t/missing-auxfile-stops-makefiles-creation.sh: Likewise. * t/parallel-am.sh: Likewise. * t/parallel-am2.sh: Likewise. * t/parallel-am3.sh: Likewise. * t/parallel-tests-log-override-recheck.sh: Likewise. * t/pkg-config-macros.sh: Likewise. * t/python-missing.sh: Likewise. * t/python-too-old.sh: Likewise. * t/python11.sh: Likewise. * t/self-check-dir.tap: Likewise. * t/self-check-report.sh: Likewise. * t/self-check-seq.tap: Likewise. * t/silent-configsite.sh: Likewise. * t/suffix6c.sh: Likewise. * t/tar-override.sh: Likewise. * t/tests-environment-and-log-compiler.sh: Likewise. * t/vala-configure.sh: Likewise. * t/werror3.sh: Likewise. * t/yflags-cmdline-override.sh: Likewise. * t/yflags.sh: Likewise. * t/yflags2.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/parallel-am3.sh')
-rw-r--r--t/parallel-am3.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/parallel-am3.sh b/t/parallel-am3.sh
index 1c87e633f..146e59f20 100644
--- a/t/parallel-am3.sh
+++ b/t/parallel-am3.sh
@@ -56,7 +56,7 @@ mkdir build-aux
$ACLOCAL
# Generate expected output using the non-threaded code.
-unset AUTOMAKE_JOBS || :
+unset AUTOMAKE_JOBS
AUTOMAKE_run --add-missing
mv stderr expected
mv Makefile.in Makefile.in.exp