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 # - A "Bail out!" directive causes the driver to ignore any TAP
19 # result or error in the rest of the following TAP stream.
24 . "$am_testauxdir"/tap-setup.sh || fatal_ "sourcing tap-setup.sh"
26 # Various errors that can all be squashed into a single test script.
27 cat > foo.test << 'END'
30 # All possible test results.
35 # Another bailout directive.
37 # Stop now, with too few tests run.
40 # Tests run after a "SKIP" plan.
41 cat > bar.test << 'END'
48 cat > baz.test << 'END'
56 TESTS='foo.test bar.test baz.test' $MAKE -e check >stdout \
57 && { cat stdout; Exit 1; }
60 count_test_results total=5 pass=1 fail=0 xpass=0 xfail=0 skip=1 error=3
62 grep '^ERROR: foo\.test - Bail out!$' stdout
63 grep '^ERROR: bar\.test - Bail out!$' stdout
64 grep '^SKIP: bar\.test' stdout
65 grep '^ERROR: baz\.test - Bail out!$' stdout
66 grep '^PASS: baz\.test 1$' stdout
68 $FGREP 'Not seen' stdout && Exit 1
70 test `$FGREP -c ': foo.test' stdout` -eq 1
71 test `$FGREP -c ': bar.test' stdout` -eq 2
72 test `$FGREP -c ': baz.test' stdout` -eq 2