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/>.
18 # - normalization of whitespace in console testsuite progress associated
19 # with TODO and SKIP directives
31 6 cc # TODO:${tab}fnord 6
33 8 - y # TODO fnord $tab 8
34 9 - z # TODO: fnord 9 $tab
40 15 das$tab$tab # TODO x5
49 6 cc # TODO:${tab}fnord 6
51 8 - y # TODO fnord $tab 8
65 xpass
=0 xfail
=0 skip
=0
67 xpass|xfail|skip
) eval $1=15;;
68 *) fatal_
"bad argument '$1' for my_make_check";;
71 $MAKE check
>stdout ||
: # Don't care about the exit status in this test.
73 count_test_results total
=15 pass
=0 fail
=0 error
=0 \
74 xpass
=$xpass xfail
=$xfail skip
=$skip
75 # Don't be too strict w.r.t. possible normalization of "TODO: foo" into
76 # "TODO : foo" (as is done by, e.g., the 'TAP::Parser' perl module).
77 LC_ALL
=C
grep '^[A-Z][A-Z]*:' stdout \
78 |
sed -e 's/# TODO *:/# TODO:/' -e 's/# SKIP *:/# SKIP:/' > got
84 # For "TODO" directives leading to XPASS results.
85 (echo $plan && sed -e 's/^/ok /' stub.tap
) > all.
test
86 sed -e 's/^/XPASS: all.test /' stub.exp
> exp
89 # For "TODO" directives leading to XFAIL results.
90 (echo $plan && sed -e 's/^/not ok /' stub.tap
) > all.
test
91 sed -e 's/^/XFAIL: all.test /' stub.exp
> exp
94 # For "SKIP" directives.
95 (echo $plan && sed -e 's/^/ok /' -e 's/TODO/SKIP/' stub.tap
) > all.
test
96 sed -e 's/TODO/SKIP/' -e 's/^/SKIP: all.test /' stub.exp
> exp