diff --git a/.gitignore b/.gitignore index 31b5e45..63b25d9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ cache.stor *.swp logs/* #*.stor +reports/files/ +*.html diff --git a/everything.stor b/everything.stor index 62afc5a..477540d 100644 Binary files a/everything.stor and b/everything.stor differ diff --git a/reports/author.pl b/reports/author.pl new file mode 100755 index 0000000..b2f09ac --- /dev/null +++ b/reports/author.pl @@ -0,0 +1,48 @@ +#!/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 %auths; + +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 = "here" + } + + my $author = Dist::get_author($mod) // '__UNKNOWN__'; + + push $auths{$author}->@*, { + name => $mod, + author => $author, + status => $status, + tested => $tested, + dist => $Dist::mod_to_dist{$mod} // $mod, + log => $log + }; +} + + +my $tt = Template->new(); +for my $auth (keys %auths) { + my $vars = { + modules => $auths{$auth}, + }; + + $tt->process('template.tt.html', $vars, "files/$auth.html"); +} diff --git a/reports/failed.pl b/reports/failed.pl index ec3512b..22f6202 100755 --- a/reports/failed.pl +++ b/reports/failed.pl @@ -36,6 +36,8 @@ for my $mod ($data->{modules}->@*) { my $author = Dist::get_author($mod); + next unless $status =~ /inc/; + push @mods, { name => $mod, author => $author,