* INSTALL, lib/INSTALL, lib/config-ml.in, lib/config.guess,
[automake/plouj.git] / tests / check7.test
blobd2cd65b259f56b62dd1858972e1d7ad438f1292f
1 #! /bin/sh
2 # Copyright (C) 2007 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
9 # any later version.
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Automake; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 # Boston, MA 02110-1301, USA.
21 # Check EXEEXT extension for XFAIL_TESTS.
23 . ./defs || exit 1
25 set -e
27 cat >> configure.in << 'END'
28 AC_PROG_CC
29 AC_OUTPUT
30 END
32 cat > Makefile.am << 'END'
33 TESTS = $(XFAIL_TESTS)
34 XFAIL_TESTS = a b c d
35 check_PROGRAMS = a c d
36 check_SCRIPTS = b
38 print-xfail-tests:
39 @echo BEG: $(XFAIL_TESTS) :END
40 END
42 cat >>b <<'END'
43 #! /bin/sh
44 exit 1
45 END
46 chmod a+x b
48 cat >>a.c <<'END'
49 #include <stdlib.h>
50 int main() { return EXIT_FAILURE; }
51 END
53 cp a.c c.c
54 cp a.c d.c
56 $ACLOCAL
57 $AUTOCONF
58 $AUTOMAKE -a
60 ./configure
61 $MAKE check
62 EXEEXT=.bin $MAKE -e print-xfail-tests >foo
63 cat foo
64 grep 'BEG: a.bin b c.bin d.bin :END' foo
66 $MAKE distclean
67 mkdir build
68 cd build
69 ../configure
70 $MAKE check