tests: Let 'ltorder.sh' run successfully with Guix dynamic loader
[automake.git] / t / check10.sh
blob2a8efc55cfa7e526d493c8cbc49dec6844f89627
1 #! /bin/sh
2 # Copyright (C) 2008-2018 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 singular and plural in test summaries.
19 # This test only makes sense for the older serial testsuite driver.
20 am_serial_tests=yes
21 . test-init.sh
23 cat >> configure.ac << 'END'
24 AC_OUTPUT
25 END
27 cat > Makefile.am << 'END'
28 TESTS = fail pass skip xfail xpass fail2 pass2 skip2 xfail2 xpass2
29 XFAIL_TESTS = xfail xpass xfail2 xpass2
30 END
32 cat > pass <<'END'
33 #! /bin/sh
34 exit 0
35 END
36 cat > fail <<'END'
37 #! /bin/sh
38 exit 1
39 END
40 cat > skip <<'END'
41 #! /bin/sh
42 exit 77
43 END
44 chmod a+x pass fail skip
45 cp pass pass2
46 cp pass xpass
47 cp xpass xpass2
48 cp fail xfail
49 cp fail fail2
50 cp xfail xfail2
51 cp skip skip2
53 $ACLOCAL
54 $AUTOCONF
55 $AUTOMAKE -a
57 ./configure
59 run_make -e IGNORE TESTS=pass check
60 run_make -e IGNORE TESTS=fail check
61 run_make -e IGNORE TESTS=skip check
62 run_make -e IGNORE TESTS=xfail check
63 run_make -e IGNORE TESTS=xpass check
64 run_make -e IGNORE TESTS="pass pass2" check
65 run_make -e IGNORE TESTS="fail fail2" check
66 run_make -e IGNORE TESTS="skip skip2" check
67 run_make -e IGNORE TESTS="xfail xfail2" check
68 run_make -e IGNORE TESTS="xpass xpass2" check
69 run_make -e IGNORE TESTS='pass skip xfail' check
70 run_make -e IGNORE check
71 ) >stdout || { cat stdout; exit 1; }
72 cat stdout
74 grep '1 [tT]ests' stdout && exit 1
75 grep '[02-9] [tT]est ' stdout && exit 1
76 grep '1 .* were ' stdout && exit 1
77 grep '[02-9].* was .*run' stdout && exit 1
78 grep 'All 1 ' stdout && exit 1
79 $EGREP '1 (un)?expected (failures|passes)' stdout && exit 1
80 $EGREP '[^1] (un)?expected (failure|pass)\)' stdout && exit 1