Unverified Commit 865b8acd authored by boklm's avatar boklm
Browse files

Convert tbbversion to tags

parent 466c8ea3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ BEGIN {
    require Exporter;
    @ISA       = qw(Exporter);
    @EXPORT_OK = qw(exit_error system_infos run_alone rm_pidfile winpath
                    has_bin get_var run_to_file get_nbcpu);
                    has_bin get_var run_to_file get_nbcpu as_array);
}

sub exit_error {
@@ -90,4 +90,8 @@ sub get_nbcpu {
    return $res;
}

sub as_array {
    ref $_[0] eq 'ARRAY' ? $_[0] : [ $_[0] ];
}

1;
+4 −3
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ use File::Copy;
use Template;
use File::Spec;
use YAML;
use TBBTestSuite::Common qw(exit_error);
use TBBTestSuite::Common qw(exit_error as_array);
use TBBTestSuite::Options qw($options);
use TBBTestSuite::Tests;
use Email::Simple;
@@ -115,8 +115,9 @@ sub make_reports_index {
        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)) {
        my $tags = as_array($reports{$report}->{options}{tags} // []);
        push @$tags, $tbbver if $tbbver;
        foreach my $tag (@$tags) {
            push @{$reports_by_tag{$type}->{$tag}}, $report;
        }
        my $testsuite = $TBBTestSuite::Tests::testsuite_types{$type};