doc: update Vala documentation
[automake.git] / t / parallel-tests-dry-run-1.sh
blob170adb9025475c84701c9c71a87c4f996ccf8a65
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 # Check interactions between the parallel test harness and "make -n".
18 # See also sister test 'parallel-tests-dry-run-2.sh'.
20 . test-init.sh
22 echo AC_OUTPUT >> configure.ac
24 cat > Makefile.am <<'END'
25 TESTS = foo.test bar.test
26 $(TESTS):
27 END
29 $ACLOCAL
30 $AUTOCONF
31 $AUTOMAKE -a
33 ./configure
35 # Avoid confusion with test logs.
36 rm -f config.log
38 log_files='test-suite.log foo.log bar.log'
40 all_exist ()
42 st=0
43 for i in $*; do
44 test -f $i || { echo File $i not found; st=1; }
45 done
46 test $st -eq 0
49 none_exist ()
51 st=0
52 for i in $*; do
53 if test -r $i || test -f $i; then
54 echo File $i found
55 st=1
57 done
58 test $st -eq 0
61 for targ in check recheck $log_files; do
62 $MAKE -n "$targ"
63 none_exist $log_files
64 done
66 touch $log_files
68 $MAKE -n mostlyclean
69 all_exist $log_files
70 $MAKE -n clean
71 all_exist $log_files
73 cat > foo.test <<'END'
74 #! /bin/sh
75 exit 0
76 END
78 cat > bar.test <<'END'
79 #! /bin/sh
80 exit 1
81 END
83 chmod a+x foo.test bar.test
85 $MAKE check && exit 1
87 for targ in recheck clean mostlyclean distclean; do
88 $MAKE -n "$targ"
89 all_exist $log_files
90 done