tests: Let 'ltorder.sh' run successfully with Guix dynamic loader
[automake.git] / t / testsuite-summary-count.sh
blobd169008206523f8458f23795918318536cc27f1f
1 #! /bin/sh
2 # Copyright (C) 2011-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 test counts in the testsuite summary.
19 . test-lib.sh
21 use_colors=no; use_vpath=no
22 . testsuite-summary-checks.sh
24 ./configure
26 header="\
27 ${br}
28 Testsuite summary for GNU AutoFoo 7.1
29 ${br}"
31 success_footer=${br}
33 failure_footer="\
34 ${br}
35 See ./test-suite.log
36 Please report to bug-automake@gnu.org
37 ${br}"
39 # Corner cases.
41 do_check '' <<END
42 $header
43 # TOTAL: 0
44 # PASS: 0
45 # SKIP: 0
46 # XFAIL: 0
47 # FAIL: 0
48 # XPASS: 0
49 # ERROR: 0
50 $success_footer
51 END
53 do_check pass.t <<END
54 $header
55 # TOTAL: 1
56 # PASS: 1
57 # SKIP: 0
58 # XFAIL: 0
59 # FAIL: 0
60 # XPASS: 0
61 # ERROR: 0
62 $success_footer
63 END
65 do_check fail.t <<END
66 $header
67 # TOTAL: 1
68 # PASS: 0
69 # SKIP: 0
70 # XFAIL: 0
71 # FAIL: 1
72 # XPASS: 0
73 # ERROR: 0
74 $failure_footer
75 END
77 # Some simpler checks, with low or moderate number of tests.
79 do_check skip.t skip2.t skip3.t xfail.t xfail2.t <<END
80 $header
81 # TOTAL: 5
82 # PASS: 0
83 # SKIP: 3
84 # XFAIL: 2
85 # FAIL: 0
86 # XPASS: 0
87 # ERROR: 0
88 $success_footer
89 END
91 do_check pass.t pass2.t xfail.t xpass.t error.t error2.t <<END
92 $header
93 # TOTAL: 6
94 # PASS: 2
95 # SKIP: 0
96 # XFAIL: 1
97 # FAIL: 0
98 # XPASS: 1
99 # ERROR: 2
100 $failure_footer
103 pass_count=22
104 skip_count=19
105 xfail_count=21
106 fail_count=18
107 xpass_count=23
108 error_count=17
109 tests_count=120
111 pass=$(seq_ 1 $pass_count | sed 's/.*/pass-&.t/')
112 skip=$(seq_ 1 $skip_count | sed 's/.*/skip-&.t/')
113 xfail=$(seq_ 1 $xfail_count | sed 's/.*/xfail-&.t/')
114 fail=$(seq_ 1 $fail_count | sed 's/.*/fail-&.t/')
115 xpass=$(seq_ 1 $xpass_count | sed 's/.*/xpass-&.t/')
116 error=$(seq_ 1 $error_count | sed 's/.*/error-&.t/')
118 do_check $pass $skip $xfail $fail $xpass $error <<END
119 $header
120 # TOTAL: $tests_count
121 # PASS: $pass_count
122 # SKIP: $skip_count
123 # XFAIL: $xfail_count
124 # FAIL: $fail_count
125 # XPASS: $xpass_count
126 # ERROR: $error_count
127 $failure_footer
130 # Mild stress test with a lot of test scripts.
132 tests_count=1888
133 pass_count=1403
134 skip_count=292
135 xfail_count=41
136 fail_count=126
137 xpass_count=17
138 error_count=9
140 pass=$(seq_ 1 $pass_count | sed 's/.*/pass-&.t/')
141 skip=$(seq_ 1 $skip_count | sed 's/.*/skip-&.t/')
142 xfail=$(seq_ 1 $xfail_count | sed 's/.*/xfail-&.t/')
143 fail=$(seq_ 1 $fail_count | sed 's/.*/fail-&.t/')
144 xpass=$(seq_ 1 $xpass_count | sed 's/.*/xpass-&.t/')
145 error=$(seq_ 1 $error_count | sed 's/.*/error-&.t/')
147 do_check $pass $skip $xfail $fail $xpass $error <<END
148 $header
149 # TOTAL: $tests_count
150 # PASS: $pass_count
151 # SKIP: $skip_count
152 # XFAIL: $xfail_count
153 # FAIL: $fail_count
154 # XPASS: $xpass_count
155 # ERROR: $error_count
156 $failure_footer