tests: rename 'tests/' => 't/', '*.test' => '*.sh'
[platform/upstream/automake.git] / t / check11.sh
1 #! /bin/sh
2 # Copyright (C) 2009-2012 Free Software Foundation, Inc.
3 #
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)
7 # any later version.
8 #
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.
13 #
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/>.
16
17 # Check skip summary.
18
19 . ./defs || Exit 1
20
21 cat >> configure.ac << 'END'
22 AC_OUTPUT
23 END
24
25 cat > Makefile.am << 'END'
26 TESTS = skip skip2
27 END
28
29 cat > skip <<'END'
30 #! /bin/sh
31 exit 77
32 END
33 chmod a+x skip
34 cp skip skip2
35
36 $ACLOCAL
37 $AUTOCONF
38 $AUTOMAKE -a
39
40 ./configure
41
42 env TESTS=skip $MAKE -e check >stdout || { cat stdout; Exit 1; }
43 cat stdout
44 if test x"$am_parallel_tests" = x"yes"; then
45   count_test_results total=1 pass=0 fail=0 skip=1 xfail=0 xpass=0 error=0
46 else
47   grep '1.*passed' stdout && Exit 1
48   : For shells with buggy 'set -e'.
49 fi
50
51 env TESTS="skip skip2" $MAKE -e check >stdout || { cat stdout; Exit 1; }
52 cat stdout
53 if test x"$am_parallel_tests" = x"yes"; then
54   count_test_results total=2 pass=0 fail=0 skip=2 xfail=0 xpass=0 error=0
55 else
56   grep '2.*passed' stdout && Exit 1
57   : For shells with buggy 'set -e'.
58 fi
59
60 :