summaryrefslogtreecommitdiff
path: root/lib/am/check.am
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-01-13 17:56:13 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-01-16 10:22:18 +0100
commit20f2ac90d14d04caef07c6e445e7b3e582374701 (patch)
tree6eb4acecf53d98dde97661c1195bf56c088af417 /lib/am/check.am
parent20d99e05c9286ded040131e89c0c90a70334ed05 (diff)
downloadautomake-20f2ac90d14d04caef07c6e445e7b3e582374701.tar.gz
check: separate .log -> .html conversion from core testsuite harness
That feature is to be deprecated in the 1.11.x series, and removed from the automake core in the 1.12 release, where it will instead be offered in a semi-independent extra '*.am' fragment. So let's start better separating the .log -> .html conversion from the "core code" of the parallel-tests harness. Reference: <http://lists.gnu.org/archive/html/automake/2012-01/msg00005.html> * lib/am/check.am (.log.html, check-html, recheck-html): Move these targets ... * automake.in (handle_tests): ... and the initialization of the TEST_SUITE_HTML variable and the cleaning of the $(TEST_SUITE_HTML) file ... * lib/am/check-html.am: ... in this new file, with related (minor) refactorings, enhancements and simplifications. * lib/am/check.am (.MAKE. PHONY, AM_RECURSIVE_TARGETS): Adjust. * lib/am/Makefile.am (dist_am_DATA): Add 'check-html.am'. * tests/parallel-tests2.test: Improve coverage.
Diffstat (limited to 'lib/am/check.am')
-rw-r--r--lib/am/check.am58
1 files changed, 15 insertions, 43 deletions
diff --git a/lib/am/check.am b/lib/am/check.am
index 29faa3813..bca776316 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, 2011 Free
-## Software Foundation, Inc.
+## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+## 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
@@ -259,48 +259,14 @@ check-TESTS:
AM_RECURSIVE_TARGETS += check
-## -------------- ##
-## Produce HTML. ##
-## -------------- ##
-
-.log.html:
- @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py'; \
- for r2h in $$list; do \
- if ($$r2h --version) >/dev/null 2>&1; then \
- R2H=$$r2h; \
- fi; \
- done; \
- if test -z "$$R2H"; then \
- echo >&2 "cannot find rst2html, cannot create $@"; \
- exit 2; \
- fi; \
- $$R2H $< >$@.tmp
- @mv $@.tmp $@
-
-# Be sure to run check first, and then to convert the result.
-# Beware of concurrent executions. Run "check" not "check-TESTS", as
-# check-SCRIPTS and other dependencies are rebuilt by the former only.
-# And expect check to fail.
-check-html:
- @if $(MAKE) $(AM_MAKEFLAGS) check; then \
- rv=0; else rv=$$?; \
- fi; \
- $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4; \
- exit $$rv
-
-.PHONY: check-html
-.MAKE: check-html
-
-AM_RECURSIVE_TARGETS += check-html
-
## -------------------- ##
## Rechecking failures. ##
## -------------------- ##
## Rerun all FAILed or XPASSed tests.
-recheck recheck-html:
- @target=`echo $@ | sed 's,^re,,'`; \
- list='' list2='$(TEST_LOGS)'; for f in $$list2; do \
+recheck:
+ @list='' list2='$(TEST_LOGS)'; \
+ for f in $$list2; do \
test -f $$f || continue; \
if test -r $$f && read line < $$f; then \
case $$line in FAIL*|XPASS*) : ;; *) continue;; esac; \
@@ -313,12 +279,18 @@ recheck recheck-html:
## <http://lists.gnu.org/archive/html/bug-automake/2010-08/msg00004.html>
if test -z "$$list"; then list=$$f; else list="$$list $$f"; fi; \
done; \
- $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"'
+ $(MAKE) $(AM_MAKEFLAGS) check AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"'
+
+.PHONY: recheck
+.MAKE: recheck
+
+AM_RECURSIVE_TARGETS += recheck
-.PHONY: recheck recheck-html
-.MAKE: recheck recheck-html
+## ----------------------------------------------- ##
+## Produce HTML. To be removed in automake 1.12. ##
+## ----------------------------------------------- ##
-AM_RECURSIVE_TARGETS += recheck recheck-html
+include check-html.am
else !%?PARALLEL_TESTS%