2 # Copyright (C) 2011-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 # TAP and $(XFAIL_TESTS): test results without directives are turned from
18 # PASS to XPASS and from FAIL to XFAIL; other results are unchanged.
24 echo 'XFAIL_TESTS = $(TESTS)' >> Makefile
33 # The next should count as a failure (and thus will be
34 # rendered into an expected failure by XFAIL_TESTS).
39 $MAKE check
>stdout
&& { cat stdout
; exit 1; }
42 count_test_results total
=7 pass
=0 fail
=0 xpass
=2 xfail
=3 skip
=1 error
=1
44 grep '^XPASS: all\.test 1$' stdout
45 grep '^XFAIL: all\.test 2$' stdout
46 grep '^XPASS: all\.test 3 # TODO' stdout
47 grep '^XFAIL: all\.test 4 # TODO' stdout
48 grep '^SKIP: all\.test 5 # SKIP' stdout
49 grep '^XFAIL: all\.test 6 # SKIP' stdout
50 grep '^ERROR: all\.test - Bail out!' stdout
52 # Check that the exit status of the testsuite is indeed 0 when we
53 # would expect success.
62 $MAKE check
>stdout ||
{ cat stdout
; exit 1; }
65 count_test_results total
=3 pass
=0 fail
=0 xpass
=0 xfail
=2 skip
=1 error
=0