doc: update Vala documentation
[automake.git] / t / parallel-tests-no-spurious-summary.sh
blob42158c6c73cdc569a178d18febe67c799f10462d
1 #! /bin/sh
2 # Copyright (C) 2009-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 ':test-results:' directives in test scripts' output doesn't
18 # originate spurious results in the testsuite summary.
20 . test-init.sh
22 cat >> configure.ac << 'END'
23 AC_OUTPUT
24 END
26 cat > Makefile.am << 'END'
27 TESTS = foo.test bar.test
28 END
30 cat > foo.test <<'END'
31 #! /bin/sh
32 echo :test-result:XFAIL
33 echo :test-result: SKIP
34 echo :test-result:ERROR
35 exit 0
36 END
37 cat > bar.test <<'END'
38 #! /bin/sh
39 echo :test-result: ERROR
40 echo :test-result:FAIL
41 echo :test-result: XPASS
42 exit 0
43 END
44 chmod a+x foo.test bar.test
46 $ACLOCAL
47 $AUTOCONF
48 $AUTOMAKE -a
50 ./configure
52 run_make -O -e IGNORE check
53 cat test-suite.log
54 cat foo.log
55 cat bar.log
56 test $am_make_rc -eq 0
58 grep '^:test-result:XFAIL$' foo.log
59 grep '^:test-result: SKIP$' foo.log
60 grep '^:test-result:FAIL$' bar.log
61 grep '^:test-result: XPASS$' bar.log
63 count_test_results total=2 pass=2 fail=0 skip=0 xfail=0 xpass=0 error=0