tests: remove recipes that run tests with 'prove'
[platform/upstream/automake.git] / tests / testsuite-summary-count.test
1 #! /bin/sh
2 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
3 #
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.
8 #
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.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 # Check test counts in the testsuite summary.
18
19 . ./defs-static || Exit 1
20
21 use_colors=no
22 use_vpath=no
23
24 . "$am_testauxdir"/testsuite-summary-checks.sh || Exit 99
25
26 ./configure
27
28 header="\
29 ${br}
30 Testsuite summary for GNU AutoFoo 7.1
31 ${br}"
32
33 success_footer=${br}
34
35 failure_footer="\
36 ${br}
37 See ./test-suite.log
38 Please report to bug-automake@gnu.org
39 ${br}"
40
41 # Corner cases.
42
43 do_check '' <<END
44 $header
45 # TOTAL: 0
46 # PASS:  0
47 # SKIP:  0
48 # XFAIL: 0
49 # FAIL:  0
50 # XPASS: 0
51 # ERROR: 0
52 $success_footer
53 END
54
55 do_check pass.t <<END
56 $header
57 # TOTAL: 1
58 # PASS:  1
59 # SKIP:  0
60 # XFAIL: 0
61 # FAIL:  0
62 # XPASS: 0
63 # ERROR: 0
64 $success_footer
65 END
66
67 do_check fail.t <<END
68 $header
69 # TOTAL: 1
70 # PASS:  0
71 # SKIP:  0
72 # XFAIL: 0
73 # FAIL:  1
74 # XPASS: 0
75 # ERROR: 0
76 $failure_footer
77 END
78
79 # Some simpler checks, with low or moderate number of tests.
80
81 do_check skip.t skip2.t skip3.t xfail.t xfail2.t <<END
82 $header
83 # TOTAL: 5
84 # PASS:  0
85 # SKIP:  3
86 # XFAIL: 2
87 # FAIL:  0
88 # XPASS: 0
89 # ERROR: 0
90 $success_footer
91 END
92
93 do_check pass.t pass2.t xfail.t xpass.t error.t error2.t <<END
94 $header
95 # TOTAL: 6
96 # PASS:  2
97 # SKIP:  0
98 # XFAIL: 1
99 # FAIL:  0
100 # XPASS: 1
101 # ERROR: 2
102 $failure_footer
103 END
104
105 pass_count=22
106 skip_count=19
107 xfail_count=21
108 fail_count=18
109 xpass_count=23
110 error_count=17
111 tests_count=120
112
113 pass=` seq_ 1 $pass_count  | sed 's/.*/pass-&.t/'`
114 skip=` seq_ 1 $skip_count  | sed 's/.*/skip-&.t/'`
115 xfail=`seq_ 1 $xfail_count | sed 's/.*/xfail-&.t/'`
116 fail=` seq_ 1 $fail_count  | sed 's/.*/fail-&.t/'`
117 xpass=`seq_ 1 $xpass_count | sed 's/.*/xpass-&.t/'`
118 error=`seq_ 1 $error_count | sed 's/.*/error-&.t/'`
119
120 do_check $pass $skip $xfail $fail $xpass $error <<END
121 $header
122 # TOTAL: $tests_count
123 # PASS:  $pass_count
124 # SKIP:  $skip_count
125 # XFAIL: $xfail_count
126 # FAIL:  $fail_count
127 # XPASS: $xpass_count
128 # ERROR: $error_count
129 $failure_footer
130 END
131
132 # Mild stress test with a lot of test scripts.
133
134 tests_count=1888
135 pass_count=1403
136 skip_count=292
137 xfail_count=41
138 fail_count=126
139 xpass_count=17
140 error_count=9
141
142 pass=` seq_ 1 $pass_count  | sed 's/.*/pass-&.t/'`
143 skip=` seq_ 1 $skip_count  | sed 's/.*/skip-&.t/'`
144 xfail=`seq_ 1 $xfail_count | sed 's/.*/xfail-&.t/'`
145 fail=` seq_ 1 $fail_count  | sed 's/.*/fail-&.t/'`
146 xpass=`seq_ 1 $xpass_count | sed 's/.*/xpass-&.t/'`
147 error=`seq_ 1 $error_count | sed 's/.*/error-&.t/'`
148
149 do_check $pass $skip $xfail $fail $xpass $error <<END
150 $header
151 # TOTAL: $tests_count
152 # PASS:  $pass_count
153 # SKIP:  $skip_count
154 # XFAIL: $xfail_count
155 # FAIL:  $fail_count
156 # XPASS: $xpass_count
157 # ERROR: $error_count
158 $failure_footer
159 END
160
161 :