2011-01-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ parallel-tests: work around Tru64/OSF 5.1 sh read bugs.
+ * lib/am/check.am ($(TEST_SUITE_LOG), recheck, recheck-html):
+ Test file readability before redirecting input from it, to avoid
+ exiting Tru64/OSF 5.1 sh which treats read as special builtin.
+ * tests/parallel-tests-unreadable-log.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+ * NEWS: Update.
+
+2011-01-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* NEWS, README: Update copyright years.
- The code for automatic dependency tracking works around a Solaris
make bug triggered by sources containing repeated slashes when the
`subdir-objects' option was used.
+
+ - The parallel-tests driver now does not produce erroneous results
+ with Tru64/OSF 5.1 sh upon unreadable log files any more.
\f
New in 1.11:
@$(am__sh_e_setup); \
list='$(TEST_LOGS)'; \
results=`for f in $$list; do \
- read line < $$f && echo "$$line" || echo FAIL; \
+ test -r $$f && read line < $$f && echo "$$line" \
+ || echo FAIL; \
done`; \
all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[ ]*//'`; \
fail=`echo "$$results" | grep -c '^FAIL'`; \
echo ".. contents:: :depth: 2"; \
echo; \
for f in $$list; do \
- read line < $$f; \
+ test -r $$f && read line < $$f || line=; \
case $$line in \
PASS:*|XFAIL:*);; \
*) echo; cat $$f;; \
list='$(TEST_LOGS)'; \
list=`for f in $$list; do \
test -f $$f || continue; \
- if read line < $$f; then \
+ if test -r $$f && read line < $$f; then \
case $$line in FAIL*|XPASS*) echo $$f;; esac; \
else echo $$f; fi; \
done | tr '\012\015' ' '`; \
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010 Free Software
-## Foundation, Inc.
+## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010, 2011 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
@$(am__sh_e_setup); \
list='$(TEST_LOGS)'; \
results=`for f in $$list; do \
- read line < $$f && echo "$$line" || echo FAIL; \
+ test -r $$f && read line < $$f && echo "$$line" \
+ || echo FAIL; \
done`; \
all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[ ]*//'`; \
fail=`echo "$$results" | grep -c '^FAIL'`; \
echo ".. contents:: :depth: 2"; \
echo; \
for f in $$list; do \
- read line < $$f; \
+ test -r $$f && read line < $$f || line=; \
case $$line in \
PASS:*|XFAIL:*);; \
*) echo; cat $$f;; \
list='$(TEST_LOGS)'; \
list=`for f in $$list; do \
test -f $$f || continue; \
- if read line < $$f; then \
+ if test -r $$f && read line < $$f; then \
case $$line in FAIL*|XPASS*) echo $$f;; esac; \
else echo $$f; fi; \
done | tr '\012\015' ' '`; \
parallel-tests8.test \
parallel-tests9.test \
parallel-tests10.test \
+parallel-tests-unreadable-log.test \
parse.test \
percent.test \
percent2.test \
parallel-tests8.test \
parallel-tests9.test \
parallel-tests10.test \
+parallel-tests-unreadable-log.test \
parse.test \
percent.test \
percent2.test \
@$(am__sh_e_setup); \
list='$(TEST_LOGS)'; \
results=`for f in $$list; do \
- read line < $$f && echo "$$line" || echo FAIL; \
+ test -r $$f && read line < $$f && echo "$$line" \
+ || echo FAIL; \
done`; \
all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[ ]*//'`; \
fail=`echo "$$results" | grep -c '^FAIL'`; \
echo ".. contents:: :depth: 2"; \
echo; \
for f in $$list; do \
- read line < $$f; \
+ test -r $$f && read line < $$f || line=; \
case $$line in \
PASS:*|XFAIL:*);; \
*) echo; cat $$f;; \
list='$(TEST_LOGS)'; \
list=`for f in $$list; do \
test -f $$f || continue; \
- if read line < $$f; then \
+ if test -r $$f && read line < $$f; then \
case $$line in FAIL*|XPASS*) echo $$f;; esac; \
else echo $$f; fi; \
done | tr '\012\015' ' '`; \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2011 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the testsuite driver copes well with unreadable test logs.
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = foo.test bar.test
+XFAIL_TESTS = bar.test
+END
+
+cat > foo.test << 'END'
+#! /bin/sh
+exit 0
+END
+cat > bar.test << 'END'
+#! /bin/sh
+exit 1
+END
+chmod a+x foo.test bar.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+# The testsuite driver will use this variable, so ensure it sanitizes
+# it and do not allow in spurious values from the environment.
+line=PASS; export line
+
+./configure
+
+$MAKE foo.log
+$MAKE bar.log
+chmod a-r foo.log bar.log
+$MAKE test-suite.log >stdout && { cat stdout; Exit 1; }
+cat stdout
+grep '^2 of 2 tests failed *$' stdout
+grep '^2 of 2 tests failed\. *$' test-suite.log
+
+: