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 that ':test-results:' directives in test scripts' output doesn't
18 # originate spurious results in the testsuite summary.
22 cat >> configure.ac
<< 'END'
26 cat > Makefile.am
<< 'END'
27 TESTS
= foo.
test bar.
test
30 cat > foo.
test <<'END'
32 echo :test-result:XFAIL
33 echo :test-result: SKIP
34 echo :test-result:ERROR
37 cat > bar.
test <<'END'
39 echo :test-result: ERROR
40 echo :test-result:FAIL
41 echo :test-result: XPASS
44 chmod a
+x foo.
test bar.
test
53 $MAKE check
>stdout || st
=$?
58 test $st -eq 0 ||
exit $st
60 grep '^:test-result:XFAIL$' foo.log
61 grep '^:test-result: SKIP$' foo.log
62 grep '^:test-result:FAIL$' bar.log
63 grep '^:test-result: XPASS$' bar.log
65 count_test_results total
=2 pass
=2 fail
=0 skip
=0 xfail
=0 xpass
=0 error
=0