Start of a real report generation suite
This commit is contained in:
parent
8a3aef3ddc
commit
9a8857203b
4 changed files with 191105 additions and 0 deletions
190929
reports/02packages.details.txt
Normal file
190929
reports/02packages.details.txt
Normal file
File diff suppressed because it is too large
Load diff
61
reports/failed.pl
Executable file
61
reports/failed.pl
Executable file
|
@ -0,0 +1,61 @@
|
||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
use v5.24.0;
|
||||||
|
use strict;
|
||||||
|
#use warnings;
|
||||||
|
|
||||||
|
use Data::Dumper;
|
||||||
|
use Storable;
|
||||||
|
use lib '../lib';
|
||||||
|
use Dist;
|
||||||
|
use Template;
|
||||||
|
|
||||||
|
my $data = retrieve '../everything.stor';
|
||||||
|
|
||||||
|
my $tested_count =()= grep {exists $data->{jobstatus}{$_}{tested}} keys $data->{jobstatus}->%*;
|
||||||
|
my $inc_count =()= grep {$data->{jobstatus}{$_}{status} =~ /inc/} keys $data->{jobstatus}->%*;
|
||||||
|
my $gen_count =()= grep {$data->{jobstatus}{$_}{status} =~ /gen/} keys $data->{jobstatus}->%*;
|
||||||
|
my $dists = 37410;
|
||||||
|
|
||||||
|
my $percent = sprintf "%02.02f%%", $tested_count/$dists * 100;
|
||||||
|
my $inc_percent = sprintf "~%02.02f%%", $inc_count/$tested_count * 100;
|
||||||
|
my $gen_percent = sprintf "~%02.02f%%", $gen_count/$tested_count * 100;
|
||||||
|
|
||||||
|
my @mods;
|
||||||
|
|
||||||
|
for my $mod ($data->{modules}->@*) {
|
||||||
|
my ($tested, $status) = $data->{jobstatus}{$mod}->@{qw/tested status/};
|
||||||
|
$tested = !!$tested ? "yes" : "no";
|
||||||
|
$status //= "";
|
||||||
|
|
||||||
|
my $log = "";
|
||||||
|
if ($status && $status ne 'success') {
|
||||||
|
my $failure = $status =~ /inc/ ? 'incfailure' : 'genfailure';
|
||||||
|
$log = "<a href='/logs/${mod}_$failure.log'>here</a>"
|
||||||
|
}
|
||||||
|
|
||||||
|
my $author = Dist::get_author($mod);
|
||||||
|
|
||||||
|
push @mods, {
|
||||||
|
name => $mod,
|
||||||
|
author => $author,
|
||||||
|
status => $status,
|
||||||
|
tested => $tested,
|
||||||
|
dist => $Dist::mod_to_dist{$mod} // $mod,
|
||||||
|
log => $log
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
my $vars = {
|
||||||
|
modules => \@mods,
|
||||||
|
percent => $percent,
|
||||||
|
inc_percent => $inc_percent,
|
||||||
|
gen_percent => $gen_percent,
|
||||||
|
dists => $dists,
|
||||||
|
tested_count => $tested_count,
|
||||||
|
inc_count => $inc_count,
|
||||||
|
gen_count => $gen_count,
|
||||||
|
};
|
||||||
|
|
||||||
|
my $tt = Template->new();
|
||||||
|
$tt->process('template.tt.html', $vars);
|
61
reports/make_testhtml.pl
Executable file
61
reports/make_testhtml.pl
Executable file
|
@ -0,0 +1,61 @@
|
||||||
|
#!/usr/bin/env perl
|
||||||
|
|
||||||
|
use v5.24.0;
|
||||||
|
use strict;
|
||||||
|
#use warnings;
|
||||||
|
|
||||||
|
use Data::Dumper;
|
||||||
|
use Storable;
|
||||||
|
use lib '../lib';
|
||||||
|
use Dist;
|
||||||
|
use Template;
|
||||||
|
|
||||||
|
my $data = retrieve '../everything.stor';
|
||||||
|
|
||||||
|
my $tested_count =()= grep {exists $data->{jobstatus}{$_}{tested}} keys $data->{jobstatus}->%*;
|
||||||
|
my $inc_count =()= grep {$data->{jobstatus}{$_}{status} =~ /inc/} keys $data->{jobstatus}->%*;
|
||||||
|
my $gen_count =()= grep {$data->{jobstatus}{$_}{status} =~ /gen/} keys $data->{jobstatus}->%*;
|
||||||
|
my $dists = 37410;
|
||||||
|
|
||||||
|
my $percent = sprintf "%02.02f%%", $tested_count/$dists * 100;
|
||||||
|
my $inc_percent = sprintf "~%02.02f%%", $inc_count/$tested_count * 100;
|
||||||
|
my $gen_percent = sprintf "~%02.02f%%", $gen_count/$tested_count * 100;
|
||||||
|
|
||||||
|
my @mods;
|
||||||
|
|
||||||
|
for my $mod ($data->{modules}->@*) {
|
||||||
|
my ($tested, $status) = $data->{jobstatus}{$mod}->@{qw/tested status/};
|
||||||
|
$tested = !!$tested ? "yes" : "no";
|
||||||
|
$status //= "";
|
||||||
|
|
||||||
|
my $log = "";
|
||||||
|
if ($status && $status ne 'success') {
|
||||||
|
my $failure = $status =~ /inc/ ? 'incfailure' : 'genfailure';
|
||||||
|
$log = "<a href='/logs/${mod}_$failure.log'>here</a>"
|
||||||
|
}
|
||||||
|
|
||||||
|
my $author = Dist::get_author($mod);
|
||||||
|
|
||||||
|
push @mods, {
|
||||||
|
name => $mod,
|
||||||
|
author => $author,
|
||||||
|
status => $status,
|
||||||
|
tested => $tested,
|
||||||
|
dist => $Dist::mod_to_dist{$mod} // $mod,
|
||||||
|
log => $log
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
my $vars = {
|
||||||
|
modules => \@mods,
|
||||||
|
percent => $percent,
|
||||||
|
inc_percent => $inc_percent,
|
||||||
|
gen_percent => $gen_percent,
|
||||||
|
dists => $dists,
|
||||||
|
tested_count => $tested_count,
|
||||||
|
inc_count => $inc_count,
|
||||||
|
gen_count => $gen_count,
|
||||||
|
};
|
||||||
|
|
||||||
|
my $tt = Template->new();
|
||||||
|
$tt->process('template.tt.html', $vars);
|
54
reports/template.tt.html
Executable file
54
reports/template.tt.html
Executable file
|
@ -0,0 +1,54 @@
|
||||||
|
<html><head>
|
||||||
|
<style>
|
||||||
|
.tested_no {
|
||||||
|
color: #777;
|
||||||
|
}
|
||||||
|
.tested_no a {
|
||||||
|
color: #77F;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status_gen {
|
||||||
|
background-color: #FF0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status_inc {
|
||||||
|
background-color: #F00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status_success {
|
||||||
|
background-color: #0F0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table, th, td {
|
||||||
|
border: 1px solid black;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
tr:nth-child(even) {
|
||||||
|
background-color: #CCC;
|
||||||
|
}
|
||||||
|
tr:nth-child(odd) {
|
||||||
|
background-color: #EEE;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table>
|
||||||
|
<thead style="font-weight: bold">
|
||||||
|
<th>Module</th><th>Tested?</th><th>results</span></th><th>Author</th><th>log</th>
|
||||||
|
</thead>
|
||||||
|
<tr><td>37410</td><td>[% tested_count %] ([% percent %])</td>
|
||||||
|
<td><span style="background-color: #F00">[% inc_count %] [% inc_percent %]</span> / <span style="background-color: #FF0">[% gen_count %] [% gen_percent %]</span></td><td></td><td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
[% FOR module IN modules %]
|
||||||
|
<tr class="tested_[% module.tested %]">
|
||||||
|
<td style="padding-left: 10px;"><a href="https://metacpan.org/pod/[% module.dist %]">[% module.dist %]</a></td>
|
||||||
|
<td>[% module.tested %]</td>
|
||||||
|
<td class="status_[%module.status%]">[%module.status%]</td>
|
||||||
|
<td>[% module.author %]</td>
|
||||||
|
<td>[% module.log %]</td>
|
||||||
|
</tr>
|
||||||
|
[% END %]
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Add table
Reference in a new issue