doc: typos in test file.
[automake.git] / t / parallel-tests-recheck-depends-on-all.sh
blob7aad1a02a34e6b54a4f16760145381fcb2d7c731
1 #! /bin/sh
2 # Copyright (C) 2012-2024 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)
7 # any later version.
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 <https://www.gnu.org/licenses/>.
17 # The parallel-tests 'recheck' target must depend on the 'all' target.
18 # See automake bug#11252.
20 required='cc native'
21 . test-init.sh
23 cat >> configure.ac << 'END'
24 AC_PROG_CC
25 AC_OUTPUT
26 END
28 cat > Makefile.am << 'END'
29 all-local:
30 test ! -f status || echo okokok > status
31 bin_PROGRAMS = foo
32 TESTS = a.test b.test c.test
33 END
35 cat > foo.c << 'END'
36 #include <stdio.h>
37 int main (void)
39 printf ("failure :-(" "\n");
40 return 1;
42 END
44 cat > a.test << 'END'
45 #!/bin/sh
46 exit 0
47 END
49 cat > b.test << 'END'
50 #!/bin/sh
51 grep okokok status
52 END
54 cat > c.test << 'END'
55 #!/bin/sh
56 ./foo
57 END
59 chmod a+x *.test
61 $ACLOCAL
62 $AUTOCONF
63 $AUTOMAKE -a
64 ./configure
66 run_make -O -e FAIL check
67 count_test_results total=3 pass=1 fail=2 skip=0 xfail=0 xpass=0 error=0
68 test ! -e status
70 $sleep
71 : > status
72 cat > foo.c << 'END'
73 #include <stdio.h>
74 int main (void)
76 printf ("success :-)" "\n");
77 return 0;
79 END
81 run_make -O recheck
82 count_test_results total=2 pass=2 fail=0 skip=0 xfail=0 xpass=0 error=0
83 grep '^PASS: b\.test$' stdout
84 grep '^PASS: c\.test$' stdout
86 run_make -O recheck
87 count_test_results total=0 pass=0 fail=0 skip=0 xfail=0 xpass=0 error=0