tests: Let 'ltorder.sh' run successfully with Guix dynamic loader
[automake.git] / t / testsuite-summary-color.sh
blob08a6499fb31af61521f1e17b6fce9c414847217f
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 coloring of the testsuite summary.
19 . test-lib.sh
21 use_colors=yes; use_vpath=no
22 . testsuite-summary-checks.sh
24 ./configure
26 # ANSI colors.
27 red='\e[0;31m'
28 grn='\e[0;32m'
29 lgn='\e[1;32m'
30 blu='\e[1;34m'
31 mgn='\e[0;35m'
32 brg='\e[1m';
33 std='\e[m';
35 success_header="\
36 ${grn}${br}${std}
37 ${grn}Testsuite summary for GNU AutoFoo 7.1${std}
38 ${grn}${br}${std}"
40 success_footer=${grn}${br}${std}
42 failure_header="\
43 ${red}${br}${std}
44 ${red}Testsuite summary for GNU AutoFoo 7.1${std}
45 ${red}${br}${std}"
47 failure_footer="\
48 ${red}${br}${std}
49 ${red}See ./test-suite.log${std}
50 ${red}Please report to bug-automake@gnu.org${std}
51 ${red}${br}${std}"
53 do_check '' <<END
54 $success_header
55 # TOTAL: 0
56 # PASS: 0
57 # SKIP: 0
58 # XFAIL: 0
59 # FAIL: 0
60 # XPASS: 0
61 # ERROR: 0
62 $success_footer
63 END
65 do_check pass.t <<END
66 $success_header
67 ${brg}# TOTAL: 1${std}
68 ${grn}# PASS: 1${std}
69 # SKIP: 0
70 # XFAIL: 0
71 # FAIL: 0
72 # XPASS: 0
73 # ERROR: 0
74 $success_footer
75 END
77 do_check skip.t <<END
78 $success_header
79 ${brg}# TOTAL: 1${std}
80 # PASS: 0
81 ${blu}# SKIP: 1${std}
82 # XFAIL: 0
83 # FAIL: 0
84 # XPASS: 0
85 # ERROR: 0
86 $success_footer
87 END
89 do_check xfail.t <<END
90 $success_header
91 ${brg}# TOTAL: 1${std}
92 # PASS: 0
93 # SKIP: 0
94 ${lgn}# XFAIL: 1${std}
95 # FAIL: 0
96 # XPASS: 0
97 # ERROR: 0
98 $success_footer
99 END
101 do_check fail.t <<END
102 $failure_header
103 ${brg}# TOTAL: 1${std}
104 # PASS: 0
105 # SKIP: 0
106 # XFAIL: 0
107 ${red}# FAIL: 1${std}
108 # XPASS: 0
109 # ERROR: 0
110 $failure_footer
113 do_check xpass.t <<END
114 $failure_header
115 ${brg}# TOTAL: 1${std}
116 # PASS: 0
117 # SKIP: 0
118 # XFAIL: 0
119 # FAIL: 0
120 ${red}# XPASS: 1${std}
121 # ERROR: 0
122 $failure_footer
125 do_check error.t <<END
126 $failure_header
127 ${brg}# TOTAL: 1${std}
128 # PASS: 0
129 # SKIP: 0
130 # XFAIL: 0
131 # FAIL: 0
132 # XPASS: 0
133 ${mgn}# ERROR: 1${std}
134 $failure_footer
137 do_check pass.t xfail.t skip.t <<END
138 $success_header
139 ${brg}# TOTAL: 3${std}
140 ${grn}# PASS: 1${std}
141 ${blu}# SKIP: 1${std}
142 ${lgn}# XFAIL: 1${std}
143 # FAIL: 0
144 # XPASS: 0
145 # ERROR: 0
146 $success_footer
149 do_check pass.t fail.t skip.t <<END
150 $failure_header
151 ${brg}# TOTAL: 3${std}
152 ${grn}# PASS: 1${std}
153 ${blu}# SKIP: 1${std}
154 # XFAIL: 0
155 ${red}# FAIL: 1${std}
156 # XPASS: 0
157 # ERROR: 0
158 $failure_footer
161 do_check pass.t xfail.t xpass.t <<END
162 $failure_header
163 ${brg}# TOTAL: 3${std}
164 ${grn}# PASS: 1${std}
165 # SKIP: 0
166 ${lgn}# XFAIL: 1${std}
167 # FAIL: 0
168 ${red}# XPASS: 1${std}
169 # ERROR: 0
170 $failure_footer
173 do_check skip.t xfail.t error.t <<END
174 $failure_header
175 ${brg}# TOTAL: 3${std}
176 # PASS: 0
177 ${blu}# SKIP: 1${std}
178 ${lgn}# XFAIL: 1${std}
179 # FAIL: 0
180 # XPASS: 0
181 ${mgn}# ERROR: 1${std}
182 $failure_footer
185 do_check pass.t skip.t xfail.t fail.t xpass.t error.t <<END
186 $failure_header
187 ${brg}# TOTAL: 6${std}
188 ${grn}# PASS: 1${std}
189 ${blu}# SKIP: 1${std}
190 ${lgn}# XFAIL: 1${std}
191 ${red}# FAIL: 1${std}
192 ${red}# XPASS: 1${std}
193 ${mgn}# ERROR: 1${std}
194 $failure_footer