#! /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 . # 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 :