2 # Copyright (C) 2008-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 # Check @substituted@ TESTS, some of which are also PROGRAMS.
18 # See also sister test 'check-subst.sh'.
20 # For gen-testsuite-part: ==> try-with-serial-tests <==
24 cat >> configure.ac
<< 'END'
26 AC_SUBST
([script_tests
],
27 ['subst-pass-script.test subst-xfail-script.test'])
28 AC_SUBST
([prog_tests
],
29 ['subst-pass-prog.test$(EXEEXT) subst-xfail-prog.test$(EXEEXT)'])
30 AC_SUBST
([xfail_tests
],
31 ['xfail-script.test subst-xfail-script.test]dnl
32 [ xfail-prog$(EXEEXT) subst-xfail-prog.test$(EXEEXT)'])
36 cat > Makefile.am
<< 'END'
37 TESTS
= pass-script.
test xfail-script.
test @script_tests@ $
(check_PROGRAMS
)
38 XFAIL_TESTS
= @xfail_tests@
39 check_PROGRAMS
= pass-prog xfail-prog @prog_tests@
40 EXTRA_PROGRAMS
= subst-pass-prog.
test subst-xfail-prog.
test
43 cat > pass-script.
test <<'END'
47 cat > xfail-script.
test <<'END'
51 chmod a
+x pass-script.
test xfail-script.
test
52 cp pass-script.
test subst-pass-script.
test
53 cp xfail-script.
test subst-xfail-script.
test
55 cat > pass-prog.c
<<'END'
56 int main (void) { return 0; }
58 cat > xfail-prog.c
<<'END'
60 int main (void) { return EXIT_FAILURE; }
62 # The .test extension is removed for the default source file name:
63 cp pass-prog.c subst-pass-prog.c
64 cp xfail-prog.c subst-xfail-prog.c