2
# Copyright (C) 2008, 2009 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
# Check @substituted@ TESTS.
18
# Note that in this test, we rely on the .test extension for the
19
# substituted names: this is necessary for parallel-tests.
25
cat >> configure.in << 'END'
27
AC_SUBST([script_tests], ['subst-pass-script.test subst-xfail-script.test'])
28
AC_SUBST([prog_tests], ['subst-pass-prog.test$(EXEEXT) subst-xfail-prog.test$(EXEEXT)'])
29
AC_SUBST([xfail_tests], ['xfail-script.test subst-xfail-script.test xfail-prog$(EXEEXT) subst-xfail-prog.test$(EXEEXT)'])
33
cat > Makefile.am << 'END'
34
TESTS = pass-script.test xfail-script.test @script_tests@ $(check_PROGRAMS)
35
XFAIL_TESTS = @xfail_tests@
36
check_PROGRAMS = pass-prog xfail-prog @prog_tests@
37
EXTRA_PROGRAMS = subst-pass-prog.test subst-xfail-prog.test
40
cat >>pass-script.test <<'END'
44
cat >>xfail-script.test <<'END'
48
chmod a+x pass-script.test xfail-script.test
49
cp pass-script.test subst-pass-script.test
50
cp xfail-script.test subst-xfail-script.test
52
cat >>pass-prog.c <<'END'
53
int main() { return 0; }
55
cat >>xfail-prog.c <<'END'
57
int main() { return EXIT_FAILURE; }
59
# The .test extension is removed for the default source file name:
60
cp pass-prog.c subst-pass-prog.c
61
cp xfail-prog.c subst-xfail-prog.c