doc: update Vala documentation
[automake.git] / t / testsuite-summary-reference-log.sh
blobf27e6fc39a335cd9cebbc89d15157b865055e1f2
1 #! /bin/sh
2 # Copyright (C) 2011-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 that the global testsuite log file referenced in the testsuite
18 # summary and in the global testsuite log itself is correct.
20 . test-init.sh
22 mv configure.ac configure.stub
24 cat > fail << 'END'
25 #!/bin/sh
26 exit 1
27 END
28 chmod a+x fail
30 cat configure.stub - > configure.ac <<'END'
31 AC_OUTPUT
32 END
34 cat > Makefile.am << 'END'
35 TEST_SUITE_LOG = my_test_suite.log
36 TESTS = fail
37 END
39 $ACLOCAL
40 $AUTOCONF
41 $AUTOMAKE -a
43 mkdir build
44 cd build
46 ../configure
48 run_make -O -e FAIL check
49 grep '^See \./my_test_suite\.log for debugging\.$' stdout
51 mkdir bar
52 run_make -O -e FAIL TEST_SUITE_LOG=bar/bar.log check
53 grep '^See \./bar/bar\.log for debugging\.$' stdout
55 cd ..
57 echo SUBDIRS = sub > Makefile.am
58 mkdir sub
59 echo TESTS = fail > sub/Makefile.am
60 mv fail sub
62 cat configure.stub - > configure.ac <<'END'
63 AC_CONFIG_FILES([sub/Makefile])
64 AC_OUTPUT
65 END
67 $ACLOCAL --force
68 $AUTOCONF --force
69 $AUTOMAKE
71 ./configure
72 run_make -O -e FAIL check
73 grep '^See sub/test-suite\.log for debugging\.$' stdout
74 cd sub
75 run_make -O -e FAIL check
76 grep '^See sub/test-suite\.log for debugging\.$' stdout
77 cd ..
79 run_make -O -e FAIL TEST_SUITE_LOG=foo.log check
80 grep '^See sub/foo\.log for debugging\.$' stdout