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:
23 . "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
27 #------------------------------------------------------------------
29 # Bailout without explanation.
43 ERROR: a.test - Bail out!
46 # pass += 1, fail +=1, error += 1
48 #------------------------------------------------------------------
50 # Bailout with explanation.
57 Bail out! We're out of disk space.
66 XPASS: b.test 2 # TODO
67 XFAIL: b.test 3 # TODO
68 ERROR: b.test - Bail out! We're out of disk space.
71 # skip += 1, xpass += 1, xfail += 1, error += 1
73 #------------------------------------------------------------------
75 # Bail out before the test plan.
87 ERROR: c.test - Bail out! BOOOH!
90 # pass += 2, error += 1
92 #------------------------------------------------------------------
94 # Bailout on the first line.
97 Bail out! mktemp -d: Permission denied
101 echo 'ERROR: d.test - Bail out! mktemp -d: Permission denied' >> exp
105 #------------------------------------------------------------------
107 # TAP input comprised only of a bailout directive.
113 echo "ERROR: e.test - Bail out!" >> exp
117 #------------------------------------------------------------------
119 # Doing the sums above, we have:
120 test_counts='total=12 pass=3 fail=1 xpass=1 xfail=1 skip=1 error=5'
122 TESTS='a.test b.test c.test d.test e.test' $MAKE -e check >stdout \
123 && { cat stdout; Exit 1; }
126 count_test_results $test_counts
128 LC_ALL=C sort exp > t
131 # We need the sort below to account for parallel make usage.
132 grep ': [abcde]\.test' stdout | LC_ALL=C sort > got