[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
parallel-tests: work around Tru64/OSF 5.1 sh read bugs.
From: |
Ralf Wildenhues |
Subject: |
parallel-tests: work around Tru64/OSF 5.1 sh read bugs. |
Date: |
Sun, 16 Jan 2011 13:45:27 +0100 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
Quoting:
http://autobuild.josefsson.org/automake/log-201101150748140530000.txt
| FAIL: parallel-tests9.test (exit: 1)
| ====================================
|
|
/tmp/am/build-alphaev67-dec-osf5.1/tests:/tmp/local/alphaev67-dec-osf5.1/bin:/tmp/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/opt/svr4/bin:/etc:/usr/etc:/usr/dt/bin:/usr/bin/X11:/usr/ucb
| + set -e
| + pwd
| /tmp/am/build-alphaev67-dec-osf5.1/tests/parallel-tests9.dir
| + cat
| + cat
| + cat
| + cat
| + cat
| + chmod a+x foo.test bar.test baz.test
| + aclocal-1.11a -Werror
| + autoconf
| + automake-1.11a --foreign -Werror -Wall -a
| + ./configure
| checking for a BSD-compatible install... ./install-sh -c
| checking whether build environment is sane... yes
| checking for a thread-safe mkdir -p... ./install-sh -c -d
| checking for gawk... no
| checking for mawk... no
| checking for nawk... nawk
| checking whether make sets $(MAKE)... yes
| checking that generated files are newer than configure... done
| configure: creating ./config.status
| config.status: creating Makefile
| + make check
|
| Stop.
|
| Stop.
|
| Stop.
| + cat stdout
| make bla
| echo bla > bla
| make check-TESTS
| PASS: foo.test
| FAIL: bar.test
| FAIL: baz.test
| ===================
| 2 of 3 tests failed
| See ./mylog.log
| ===================
| *** Exit 1*** Exit 1*** Exit 1+ make recheck
|
| Stop.
|
| Stop.
|
| Stop.
|
| Stop.
| + cat stdout
| make TEST_LOGS="bar.log baz.log" bla
| `bla' is up to date.
| make TEST_LOGS="bar.log baz.log" check-TESTS
| FAIL: bar.test
| FAIL: baz.test
| ===================
| 2 of 2 tests failed
| See ./mylog.log
| ===================
| *** Exit 1*** Exit 1*** Exit 1*** Exit 1+ grep foo.test stdout
| + grep bar.test stdout
| FAIL: bar.test
| + grep baz.test stdout
| FAIL: baz.test
| + grep 2 of 2.*failed stdout
| 2 of 2 tests failed
| + chmod a-r foo.log
| + test ! -r foo.log
| + make recheck
| sh: foo.log: cannot open
| + cat stdout
| make TEST_LOGS="" bla
| `bla' is up to date.
| make TEST_LOGS="" check-TESTS
| ==================
| All 0 tests passed
| ==================
| + Exit 1
This is due to this portability issue:
http://thread.gmane.org/gmane.comp.sysutils.autoconf.patches/7522
Here's a patch to fix the instances I could find in the Automake tree.
Unfortunately, I don't see an easy way to expose the first two hunks in
check.am, they would require making a log unreadable between the test
running and the summary generation.
I'll wait a bit for comments, before pushing this to maint.
Thanks,
Ralf
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.
* NEWS: Update.
diff --git a/NEWS b/NEWS
index bbc177d..1bfe7ea 100644
--- a/NEWS
+++ b/NEWS
@@ -117,6 +117,9 @@ Bugs fixed in 1.11a:
AUTOMAKE_OPTIONS = -Wall --foreign
will cause the warnings in category `portability' to be enabled, even
if those warnings are by default disabled in `foreign' strictness.
+
+ - The parallel-tests driver now does not produce erroneous results
+ with Tru64/OSF 5.1 sh upon unreadable log files any more.
New in 1.11:
diff --git a/lib/am/check.am b/lib/am/check.am
index c953be8..5728081 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -1,6 +1,6 @@
## 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
@@ -146,7 +146,8 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
@$(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'`; \
@@ -195,7 +196,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
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;; \
@@ -287,7 +288,7 @@ recheck recheck-html:
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-tests: work around Tru64/OSF 5.1 sh read bugs.,
Ralf Wildenhues <=