From: Stefano Lattarini Date: Mon, 13 Feb 2012 21:24:35 +0000 (+0100) Subject: tests: avoid spurious failure with NetBSD /bin/ksh X-Git-Tag: ng-0.5a~9^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36eef89b91db0eff6a1cb9f51df8d50f728e54f0;p=thirdparty%2Fautomake.git tests: avoid spurious failure with NetBSD /bin/ksh * tests/parallel-tests-fd-redirect-exeext.test (configure.in): Tweak so that we don't end up with the generated configure script having two nested subshells that start with '((': ((./conftest$EXEEXT 9>&1) | grep "^foobar") >&5 2>&5 which is unportable and could confuse some shells (e.g., NetBSD 5.1 /bin/ksh) into thinking we are trying to perform an arithmetic operation. --- diff --git a/tests/parallel-tests-fd-redirect-exeext.test b/tests/parallel-tests-fd-redirect-exeext.test index 0f9d6da33..4426604a5 100755 --- a/tests/parallel-tests-fd-redirect-exeext.test +++ b/tests/parallel-tests-fd-redirect-exeext.test @@ -34,7 +34,11 @@ AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[write (9, "foobar\n", 7); return 0;]])], [AM_RUN_LOG([./conftest$EXEEXT 9>&1]) \ - && AM_RUN_LOG([(./conftest$EXEEXT 9>&1) | grep "^foobar"]) \ +dnl Leading ":;" required to avoid having two nested subshells starting +dnl with '((' in the generated configure: that is unportable and could +dnl confuse some shells (e.g., NetBSD 5.1 /bin/ksh) into thinking we are +dnl trying to perform an arithmetic operation. + && AM_RUN_LOG([:; (./conftest$EXEEXT 9>&1) | grep "^foobar"]) \ && am__ok=yes]) test $am__ok = yes || AS_EXIT([63]) AM_CONDITIONAL([real_EXEEXT], [test -n "$EXEEXT"])