2 # Copyright (C) 2009-2012 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Check parallel-tests features:
20 # FIXME: the features tested by this script has been moved in contrib.
21 # FIXME: We should move this script accordingly.
25 # Try the variants that are tried in check-html.am.
27 for r2h in $RST2HTML rst2html rst2html.py; do
28 echo "$me: running $r2h --version"
29 $r2h --version && break 2
30 : For shells with busted 'set -e'.
32 skip_all_ "no proper rst2html program found"
36 cp "$am_top_srcdir"/contrib/check-html.am . \
37 || fatal_ "cannot fetch 'check-html.am' from contrib"
39 cat >> configure.ac << 'END'
43 cat > Makefile.am << 'END'
44 TEST_SUITE_LOG = mylog.log
45 TESTS = foo.test bar.test baz.test
50 include $(srcdir)/check-html.am
53 cat > foo.test <<'END'
60 cat > bar.test <<'END'
66 cat > baz.test <<'END'
72 chmod a+x foo.test bar.test baz.test
80 $MAKE check-html && Exit 1
82 # check-html should cause check_SCRIPTS to be created.
85 # "make clean" should remove HTML files.
90 # Always create the HTML output, even if there were no failures.
92 env TESTS=foo.test $MAKE -e check-html
95 # Create summarizing HTML output also with recheck-html.
97 env TESTS=foo.test $MAKE -e recheck-html
100 # Create HTML output for an individual test.
102 grep 'this is .*foo\.test' foo.html
106 # Create HTML output for individual tests. Since the pre-existing log
107 # files are expected to be used for the HTML conversion, this should
108 # go smoothly even for failed tests.
109 $MAKE bar.html baz.html
110 grep 'this is .*bar\.test' bar.html
111 grep 'this is .*baz\.test' baz.html
113 # HTML output removed by mostlyclean.
120 # check-html and recheck-html should cause check_SCRIPTS to be created,
121 # and recheck-html should rerun no tests if check has not been run.
125 env TEST_LOGS=foo.log $MAKE -e check-html
133 env TESTS=foo.test $MAKE -e recheck-html