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.
26 # Try the variants that are tried in check-html.am.
28 for r2h in $RST2HTML rst2html rst2html.py; do
29 echo "$me: running $r2h --version"
30 # Don't use "&&" here, or a bug of 'set -e' present in some
31 # versions of the BSD shell will be triggered. We add the
32 # dummy "else" branch for extra safety.
33 if $r2h --version; then break 2; else :; fi
35 skip_all_ "no proper rst2html program found"
39 cp "$am_top_srcdir"/contrib/check-html.am . \
40 || fatal_ "cannot fetch 'check-html.am' from contrib"
42 cat >> configure.ac << 'END'
46 cat > Makefile.am << 'END'
47 TEST_SUITE_LOG = mylog.log
48 TESTS = foo.test bar.test baz.test
53 include $(srcdir)/check-html.am
56 cat > foo.test <<'END'
63 cat > bar.test <<'END'
69 cat > baz.test <<'END'
75 chmod a+x foo.test bar.test baz.test
83 $MAKE check-html && Exit 1
85 # check-html should cause check_SCRIPTS to be created.
88 # "make clean" should remove HTML files.
93 # Always create the HTML output, even if there were no failures.
95 env TESTS=foo.test $MAKE -e check-html
98 # Create summarizing HTML output also with recheck-html.
100 env TESTS=foo.test $MAKE -e recheck-html
103 # Create HTML output for an individual test.
105 grep 'this is .*foo\.test' foo.html
109 # Create HTML output for individual tests. Since the pre-existing log
110 # files are expected to be used for the HTML conversion, this should
111 # go smoothly even for failed tests.
112 $MAKE bar.html baz.html
113 grep 'this is .*bar\.test' bar.html
114 grep 'this is .*baz\.test' baz.html
116 # HTML output removed by mostlyclean.
123 # check-html and recheck-html should cause check_SCRIPTS to be created,
124 # and recheck-html should rerun no tests if check has not been run.
128 env TEST_LOGS=foo.log $MAKE -e check-html
136 env TESTS=foo.test $MAKE -e recheck-html