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 # Basic TAP test protocol support:
26 #------------------------------------------------------------------
28 # Bailout without explanation.
42 ERROR: a.test - Bail out!
45 # pass += 1, fail +=1, error += 1
47 #------------------------------------------------------------------
49 # Bailout with explanation.
56 Bail out! We're out of disk space.
65 XPASS: b.test 2 # TODO
66 XFAIL: b.test 3 # TODO
67 ERROR: b.test - Bail out! We're out of disk space.
70 # skip += 1, xpass += 1, xfail += 1, error += 1
72 #------------------------------------------------------------------
74 # Bail out before the test plan.
86 ERROR: c.test - Bail out! BOOOH!
89 # pass += 2, error += 1
91 #------------------------------------------------------------------
93 # Bailout on the first line.
96 Bail out! mktemp -d: Permission denied
100 echo 'ERROR: d.test - Bail out! mktemp -d: Permission denied' >> exp
104 #------------------------------------------------------------------
106 # TAP input comprised only of a bailout directive.
112 echo "ERROR: e.test - Bail out!" >> exp
116 #------------------------------------------------------------------
118 # Doing the sums above, we have:
119 test_counts
='total=12 pass=3 fail=1 xpass=1 xfail=1 skip=1 error=5'
121 TESTS
='a.test b.test c.test d.test e.test' $MAKE -e check
>stdout \
122 && { cat stdout
; exit 1; }
125 count_test_results
$test_counts
127 LC_ALL
=C
sort exp
> t
130 # We need the sort below to account for parallel make usage.
131 grep ': [abcde]\.test' stdout | LC_ALL
=C
sort > got