]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
check: move ".log -> .html" conversion in contrib
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 17 Jan 2012 14:06:05 +0000 (15:06 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 17 Jan 2012 14:39:59 +0000 (15:39 +0100)
That feature has been deprecated in the 1.11.x series, and marked
for removal from the automake core in the 1.12 release.  Here we
implement such removal.

Reference:
  <http://lists.gnu.org/archive/html/automake/2012-01/msg00005.html>

See also commit 'v1.11-650-g20f2ac9'.

* doc/automake.texi, NEWS: Update.
* lib/am/check.am: Don't include 'check-html.am' anymore.
* lib/am/check-html.am: Move ...
* contrib/check-html.am: ... to this, and adjust comments.
* lib/am/Makefile.am (dist_am_DATA): Update.
* contrib/Makefile.am (EXTRA_DIST): Likewise.
* tests/parallel-tests2.test: Adjust.
* tests/parallel-tests-dryrun.test: Remove checks on the
".log -> .html" conversion.
* tests/test-driver-custom-html.test: Remove as obsolete.
* tests/test-driver-custom-no-html.test: Likewise.
* tests/tap-html.test: Likewise.
* tests/list-of-tests.mk: Don't list removed tests anymore.

12 files changed:
NEWS
contrib/Makefile.am
contrib/check-html.am [moved from lib/am/check-html.am with 91% similarity]
doc/automake.texi
lib/am/Makefile.am
lib/am/check.am
tests/list-of-tests.mk
tests/parallel-tests-dryrun.test
tests/parallel-tests2.test
tests/tap-html.test [deleted file]
tests/test-driver-custom-html.test [deleted file]
tests/test-driver-custom-no-html.test [deleted file]

diff --git a/NEWS b/NEWS
index 98a1ec0fc2685c35fc2bebadbabd2f68b31be4ab..f2bced61de7c90c64bdb30b255e427aa58648684 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,11 @@ New in 1.11a:
 
   - Support for automatic de-ANSI-fication has been removed.
 
+  - Support for ".log -> .html" conversion and the check-html and
+    recheck-html targets has been removed from Automake core (but
+    remains available in the 'contrib/' directory of the Automake
+    distribution).
+
   - The deprecated `lzma' compression format for distribution archives
     has been removed, in favor of `xz' and `lzip'.
 
index b49192317c4b8d88332c3ca218e34559d678b1ec..970ef75ac8d5cfb165d40fe9ad88f63a16ab1518 100644 (file)
@@ -17,4 +17,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-EXTRA_DIST = README
+EXTRA_DIST = \
+  check-html.am \
+  README
similarity index 91%
rename from lib/am/check-html.am
rename to contrib/check-html.am
index 13f0a47a886c7d4c32c7c2e2288e1e5a776cde5b..15269769e5634ec6355f92cd8465a73674584ab7 100644 (file)
 ## Makefile.am fragment to produce HTML output from RST-formatted
 ## log files produced by the parallel-tests output.
 ## This fragment was part of the automake core in the 1.11.x release
-## series, but is to be moved out in the 1.12 release.
+## series, but has been then moved to contrib.
 
 TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
 
-mostlyclean-am: am--mostlyclean-test-html
-.PHONY: am--mostlyclean-test-html
-am--mostlyclean-test-html:
+mostlyclean-local: mostlyclean-check-html
+.PHONY: mostlyclean-check-html
+mostlyclean-check-html:
 ## Expand $(TEST_LOGS) only once, to avoid exceeding line length limits.
        list='$(TEST_LOGS:.log=.html)'; test -z "$$list" || rm -f $$list
        rm -f $(TEST_SUITE_HTML)
@@ -55,7 +55,5 @@ check-html recheck-html:
        $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) TEST_LOGS= || exit 4; \
        exit $$rv
 
-AM_RECURSIVE_TARGETS += check-html recheck-html
-
 .PHONY: check-html recheck-html
 .MAKE: check-html recheck-html
index 2090f38d42632a04a6d743e4f0f14f1cc61dfbbd..6be7ac31360ad6cac57c3bdb330a4f286a30a79e 100644 (file)
@@ -344,7 +344,6 @@ API for Custom Test Drivers
 * Command-line arguments for test drivers::
 * Log files generation and test results recording::
 * Testsuite progress output::
-* HTML generation from testsuite logs::
 
 Changing Automake's Behavior
 
@@ -8997,10 +8996,11 @@ versions.
 @cindex @option{parallel-tests}, Using
 
 The parallel (or concurrent) test harness is enabled by the Automake option
-@option{parallel-tests} .  It features concurrent execution of tests with
-@code{make -j}, allows to specify inter-test dependencies, lazy reruns of
-tests that have not completed in a prior run, summary and verbose output in
-@samp{RST} (reStructuredText) and @samp{HTML} format.
+@option{parallel-tests}.  It features automatic collection of the test
+scripts output in @file{.log} files, concurrent execution of tests with
+@code{make -j}, specification of inter-test dependencies, lazy reruns of
+tests that have not completed in a prior run, and hard errors for exceptional
+failures. 
 
 This harness is still somewhat experimental and may undergo changes in
 order to satisfy additional portability requirements.
@@ -9115,15 +9115,6 @@ LOG_COMPILER = $(PERL)
 AM_LOG_FLAGS = -Mstrict -w
 @end example
 
-@trindex check-html
-@vindex RST2HTML
-@vindex TEST_SUITE_HTML
-@noindent
-Previous versions of automake used to provide a @code{check-html} target
-to convert the log files to HTML.  This feature is now deprecated, and
-@emph{will be removed} in the next major Automake release, so don't rely
-on it anymore.
-
 By default, the test suite harness will run all tests, but there are
 several ways to limit the set of tests that are run:
 
@@ -9371,7 +9362,6 @@ with the parallel test harness and its default driver.
 * Command-line arguments for test drivers::
 * Log files generation and test results recording::
 * Testsuite progress output::
-* HTML generation from testsuite logs::
 @end menu
 
 @node Command-line arguments for test drivers
@@ -9440,9 +9430,7 @@ program fails or crashes).
 The @file{.log} file should ideally contain all the output produced by the
 tested program, plus optionally other information that might facilitate
 debugging or analysis of bug reports.  Apart from that, its format is
-basically free; the only limitation being that it must parse validly as
-reStructuredText if the @file{.log} -> @file{.html} conversion is to be
-supported.
+basically free.
 
 The @file{.trs} file is used to register some metadata through the use
 of custom reStructuredText fields.  This metadata is expected to be
@@ -9561,15 +9549,6 @@ implementations' output might be a good idea too.
 @c TODO: be implemented either using a driver cmdline flag, or an
 @c TODO: environment variable, or both).
 
-@node HTML generation from testsuite logs
-@subsubsection HTML generation from testsuite logs
-
-If HTML testsuite output (with @code{check-html}) is to be supported,
-the generated @file{.log} files must contain syntactically valid
-reStructuredText.  If this is not the case, the HTML generation will not
-work, although all the other functionalities of the Automake testsuite
-harness should remain untouched, and continue to work correctly.
-
 @node Using the TAP test protocol
 @section Using the TAP test protocol
 
index 52dbe1a50319c072cad1db58f90fa540b8ea2919..a174d202e48835aff657487be77e7916b046915a 100644 (file)
@@ -20,7 +20,6 @@
 
 dist_am_DATA = \
 check.am \
-check-html.am \
 check2.am \
 clean-hdr.am \
 clean.am \
index 4ed3f7e385b513b78122972a83f90a3dad40717d..fb8213771f6277b48605be6012033222c9335b93 100644 (file)
@@ -376,12 +376,6 @@ AM_RECURSIVE_TARGETS += check recheck
 
 .PHONY: recheck
 
-## ----------------------------------------------- ##
-## Produce HTML.  To be removed in automake 1.12.  ##
-## ----------------------------------------------- ##
-
-include check-html.am
-
 else !%?PARALLEL_TESTS%
 
 check-TESTS: $(TESTS)
index 2df25d1312e790e3d49bf0863714057145f9b6a1..b6b74d9499c1beb8e56420c574d7bf4abdd5ef20 100644 (file)
@@ -723,8 +723,6 @@ test-driver-custom-xfail-tests.test \
 test-driver-custom-multitest.test \
 test-driver-custom-multitest-recheck.test \
 test-driver-custom-multitest-recheck2.test \
-test-driver-custom-html.test \
-test-driver-custom-no-html.test \
 test-driver-create-log-dir.test \
 test-driver-strip-vpath.test \
 test-driver-trs-suffix-registered.test \
@@ -1018,7 +1016,6 @@ tap-fancy.test \
 tap-fancy2.test \
 tap-global-log.test \
 tap-global-result.test \
-tap-html.test \
 tap-log.test \
 tap-msg0-result.test \
 tap-msg0-directive.test \
index 532a0125578f3d0f5c38fffc5e23b9ee9add98f7..3cec67e1442a297768c93236fecfd3df6b9f661e 100755 (executable)
@@ -38,8 +38,6 @@ $AUTOMAKE -a
 rm -f config.log
 
 log_files='test-suite.log foo.log bar.log'
-html_files='test-suite.html foo.html bar.html'
-the_files="$log_files $html_files"
 
 all_exist ()
 {
@@ -59,17 +57,17 @@ none_exist ()
   test $st -eq 0
 }
 
-for targ in check recheck check-html recheck-html $the_files; do
+for targ in check recheck $log_files; do
   $MAKE -n "$targ"
-  none_exist $the_files
+  none_exist $log_files
 done
 
-touch $the_files
+touch $log_files
 
 $MAKE -n mostlyclean
-all_exist $the_files
+all_exist $log_files
 $MAKE -n clean
-all_exist $the_files
+all_exist $log_files
 
 cat > foo.test <<'END'
 #! /bin/sh
@@ -85,9 +83,9 @@ chmod a+x foo.test bar.test
 
 $MAKE check && Exit 1
 
-for targ in recheck recheck-html clean mostlyclean distclean; do
+for targ in recheck clean mostlyclean distclean; do
   $MAKE -n "$targ"
-  all_exist $the_files
+  all_exist $log_files
 done
 
 :
index 23e1d4244357165af54893b41d333193a546296d..a9ef964bc13b82b2094baecad9ddd2bc6a35d173 100755 (executable)
 # Check parallel-tests features:
 #  - check-html
 #  - recheck-html
-# Keep this in sync with sister test `test-driver-custom-html.test'.
+# FIXME: the features tested by this script has been moved in contrib.
+# FIXME: We should move this script accordingly.
 
 am_parallel_tests=yes
-required=rst2html
 . ./defs || Exit 1
 
+# Try the variants that are tried in check-html.am.
+while :; do
+  for r2h in $RST2HTML rst2html rst2html.py; do
+    echo "$me: running $r2h --version"
+    $r2h --version && break 2
+  done
+  skip_all_ "no proper rst2html program found"
+done
+unset r2h
+
+cp "$top_testsrcdir"/contrib/check-html.am . \
+  || fatal_ "cannot fetch 'check-html.am' from contrib"
+
 cat >> configure.in << 'END'
 AC_OUTPUT
 END
@@ -34,6 +47,7 @@ check_SCRIPTS = bla
 bla:
        echo bla > $@
 CLEANFILES = bla
+include $(srcdir)/check-html.am
 END
 
 cat > foo.test <<'END'
diff --git a/tests/tap-html.test b/tests/tap-html.test
deleted file mode 100755 (executable)
index ca0ffd0..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#! /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/>.
-
-# TAP support:
-#  - "check-html" and "recheck-html" targets
-#  - reStructuredText -> HTML conversion
-
-am_parallel_tests=yes
-required=rst2html
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-TEST_LOG_COMPILER = cat
-TESTS = ok.test ko.test
-END
-
-. "$testsrcdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
-
-cat > ok.test << 'END'
-1..3
-ok 1 - expected success
-not ok 2 - expectred failure # TODO
-ok 3 - skipped test # SKIP
-END
-
-cat > ko.test << 'END'
-1..2
-not ok 1 - unexpected failure
-ok 2 - spurious success # TODO
-Bail out! hard error
-END
-
-no_rst2html_error ()
-{
-  $EGREP '(test-suite\.log:[0-9]|WARNING|SEVERE)' output && Exit 1
-  :
-}
-
-# Overriding TESTS should work with check-html.
-TESTS=ok.test $MAKE -e check-html >output 2>&1 || { cat output; Exit 1; }
-cat output
-no_rst2html_error
-test -f test-suite.html
-
-mv output stdout
-count_test_results total=3 pass=1 fail=0 xpass=0 xfail=1 skip=1 error=0
-
-: > older
-$sleep
-$MAKE check-html >output 2>&1 && { cat output; Exit 1; }
-cat output
-no_rst2html_error
-# test-suite.html should be remake if if it was up-to-date.
-test -f test-suite.html
-is_newest test-suite.html older
-
-mv output stdout
-count_test_results total=6 pass=1 fail=1 xpass=1 xfail=1 skip=1 error=1
-
-rm -f ok.test
-$MAKE recheck-html >output 2>&1 && { cat output; Exit 1; }
-cat output
-no_rst2html_error
-
-mv output stdout
-count_test_results total=3 pass=0 fail=1 xpass=1 xfail=0 skip=0 error=1
-
-:
diff --git a/tests/test-driver-custom-html.test b/tests/test-driver-custom-html.test
deleted file mode 100755 (executable)
index e9f60d7..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-#! /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/>.
-
-# Custom test drivers features:
-#  - check-html
-#  - recheck-html
-# Keep this in sync with sister test `parallel-tests2.test'.
-
-am_parallel_tests=yes
-required=rst2html
-. ./defs || Exit 1
-
-cp "$testsrcdir"/trivial-test-driver . \
-  || fatal_ "failed to fetch auxiliary script trivial-test-driver"
-
-cat >> configure.in << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-TEST_LOG_DRIVER = $(SHELL) ./trivial-test-driver
-TEST_SUITE_LOG = mylog.log
-TESTS = foo.test bar.test baz.test
-check_SCRIPTS = bla
-bla:
-       echo bla > $@
-CLEANFILES = bla
-END
-
-cat > foo.test <<'END'
-#! /bin/sh
-if test -f bla; the
-  echo "PASS: this is $0"
-else
-  echo "FAIL: this is $0"
-fi
-END
-
-cat > bar.test <<'END'
-#! /bin/sh
-echo "FAIL: this is $0"
-END
-
-cat > baz.test <<'END'
-#! /bin/sh
-echo "FAIL: this is $0"
-END
-
-chmod a+x foo.test bar.test baz.test
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-
-$MAKE check-html && Exit 1
-test -f mylog.html
-# check-html should cause check_SCRIPTS to be created.
-test -f bla
-
-# "make clean" should remove HTML files.
-$MAKE clean
-test ! -f mylog.html
-test ! -f bla
-
-# Always create the HTML output, even if there were no failures.
-rm -f mylog.html
-env TESTS=foo.test $MAKE -e check-html
-test -f mylog.html
-
-# Create summarizing HTML output also with recheck-html.
-rm -f mylog.html
-env TESTS=foo.test $MAKE -e recheck-html
-test -f mylog.html
-
-# check-html should cause check_SCRIPTS to be created.
-$MAKE clean
-env TEST_LOGS=foo.log $MAKE -e check-html
-test -f bla
-test -f foo.log
-test -f mylog.html
-# recheck-html should cause check_SCRIPTS to be created, and should rerun
-# no tests if it appears that check has not been run.
-$MAKE clean
-env TESTS=foo.test $MAKE -e recheck-html
-test -f bla
-test ! -f foo.log
-test -f mylog.html
-
-:
diff --git a/tests/test-driver-custom-no-html.test b/tests/test-driver-custom-no-html.test
deleted file mode 100755 (executable)
index 970cf62..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#! /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 custom test drivers does not need to produce sensible
-# reStructuredText output in the test logs.  This might be legitimate
-# for drivers that are not interested to support the .log -> HTML
-# conversion offered by Automake.
-
-am_parallel_tests=yes
-. ./defs || Exit 1
-
-cat >> configure.in << 'END'
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-TEST_LOG_DRIVER = ./no-rst
-TESTS = foo.test
-END
-
-: > foo.test
-
-cat > no-rst <<'END'
-#! /bin/sh
-echo ':test-result: SKIP' > foo.trs
-echo ':copy-in-global-log: yes' >> foo.trs
-# The genereted log file is deliberately syntactically invalid
-# reStructuredText.
-cat > foo.log <<'EOF'
-SKIP: FooBar
-=============
-
---------------
- dummy title
-EOF
-END
-chmod a+x no-rst
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-VERBOSE=yes $MAKE check
-cat foo.log
-cat test-suite.log
-$FGREP 'dummy title' test-suite.log
-
-# Sanity check: trying to produce HTML output should fail.
-$MAKE check-html >output 2>&1 && { cat output; Exit 1; }
-cat output
-# The second grep is to avoid spurious failures on systems without
-# a working `rst2html' program.
-$FGREP SEVERE output || $FGREP 'cannot find rst2html' output
-
-: