164 | Status | Component | Proof | Component description |
165 | EOM
166 | ## }}}
167 |
168 | ## Look up all directory entries
169 | ## {{{
170 | # We'll use this result to look for subdirectories that might contain
171 | # log files.
172 | opendir(DIR, $dir) or die "Cannot open directory for reading";
173 | my @dirent = readdir(DIR);
174 | closedir(DIR);
175 |
176 | # print "@dirent";
177 | ## }}}
178 |
179 | # Lookup each components proof
180 | foreach $prf (sort @proofs) {
181 | my $ndirs=0;
182 | foreach $dent (@dirent) {
183 | next if (! -d $dent);
184 | next if ($dent =~ /^\./);
185 | next if ($dent !~ /^$prf(_\S+)/);
186 | $subprf = $1;
187 |
188 | $ndirs = $ndirs+1;
189 | }
190 |
191 | my $firstd = 1;
192 |
193 | # Find each subproof of the component
194 | foreach $dent (@dirent) {
195 | ## Filter out the wrong directories
196 | ## {{{
197 | # print("DIR $dent |
\n");
198 | # Only look at subdirectories
199 | next if (! -d $dent);
200 | next if ($dent =~ /^\./);
201 | next if ($dent !~ /^$prf(_\S+)/);
202 | $subprf = $1;
203 | # print("$dent matches $prf |
\n");
204 | ## }}}
205 |
206 | ## Get the resulting status
207 | $st = getstatus($dent);
208 | # print("STATUS = $st |
\n");
209 |
210 | ## Fill out one entry of our table
211 | ## {{{
212 | my $tail;
213 | if ($firstd) {
214 | print "
\n";
215 | $tail = "$prf | $subprf | $desc{$prf} | \n";
216 | $firstd = 0;
217 | } else {
218 | $tail = "$prf | $subprf | \n";
219 | }
220 | if ($st =~ /PASS/) {
221 | print "Pass$tail";
222 | } elsif ($st =~ /Cover\s+(\d+)/) {
223 | my $cvr = $1;
224 | if ($cvr < 1) {
225 | print " |
$1 Cover points$tail";
226 | } else {
227 | print " |
$1 Cover points$tail";
228 | }
229 | } elsif ($st =~ /FAIL/) {
230 | print " |
FAIL$tail";
231 | } elsif ($st =~ /Terminated/) {
232 | print " |
Terminated$tail";
233 | } elsif ($st =~ /ERROR/) {
234 | print " |
ERROR$tail";
235 | } elsif ($st =~ /Out of date/) {
236 | print " |
Out of date$tail";
237 | } elsif ($st =~ /BMC\s+(\d+)/) {
238 | my $bmc = $1;
239 | if ($bmc < 2) {
240 | print " |
$bmc steps of BMC$tail";
241 | } else {
242 | print " |
$bmc steps of BMC$tail";
243 | }
244 | } elsif ($st =~ /No log/) {
245 | print " |
No log file found$tail";
246 | } else {
247 | print " |
Unknown$tail";
248 | }
249 | ## }}}
250 | } if ($myfirstd != 0) {
251 | print " |
Not found | $prf | | $desc{$prf} |
\n";
252 | }
253 | }
254 |
255 | ## Finish the HTML log file
256 | ## {{{
257 | print <<"EOM";
258 |
259 |
260 | EOM
261 | ## }}}
262 |
--------------------------------------------------------------------------------
/bench/formal/report.html:
--------------------------------------------------------------------------------
1 |