Unverified Commit 88db319d authored by boklm's avatar boklm
Browse files

Allow setting tags on reports

And generate index pages per tag.
parent 194b17a8
......@@ -108,12 +108,17 @@ sub make_reports_index {
my @reports_by_time =
sort { $reports{$b}->{time} <=> $reports{$a}->{time} } keys %reports;
my %reports_by_tbbversion;
my %reports_by_tag;
my %reports_by_type;
foreach my $report (keys %reports) {
my $tbbver = $reports{$report}->{options}{tbbversion};
push @{$reports_by_tbbversion{$tbbver}}, $report if $tbbver;
my $type = report_type($reports{$report});
push @{$reports_by_type{$type}}, $report;
my $tags = $reports{$report}->{options}{tags} // [];
foreach my $tag (ref $tags ? @$tags : ($tags)) {
push @{$reports_by_tag{$type}->{$tag}}, $report;
}
my $testsuite = $TBBTestSuite::Tests::testsuite_types{$type};
$testsuite->{pre_reports_index}(\%reports, $reports{$report})
if $testsuite->{pre_reports_index};
......@@ -143,6 +148,15 @@ sub make_reports_index {
{ %$vars, reports_list => \@s }, "index-$type.html")
|| exit_error "Template Error:\n" . $template->error;
}
foreach my $type (keys %reports_by_tag) {
foreach my $tag (keys %{$reports_by_tag{$type}}) {
my @s = sort { $reports{$b}->{time} <=> $reports{$a}->{time} }
@{$reports_by_tag{$type}->{$tag}};
$template->process("reports_index_$type.html",
{ %$vars, reports_list => \@s }, "index-$type-$tag.html")
|| exit_error "Template Error:\n" . $template->error;
}
}
}
sub text_report {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment