Unverified Commit 766d0371 authored by boklm's avatar boklm
Browse files

Add a file_known_issue subroutine

This subroutine can be used to set a command test as a known issue for
some specific files only.
parent 0a5385ae
......@@ -8,7 +8,7 @@ our (@ISA, @EXPORT_OK);
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(command_run);
@EXPORT_OK = qw(command_run file_known_issue);
}
sub command_run {
......@@ -29,4 +29,24 @@ sub command_run {
}
}
sub file_known_issue {
my %files = @_;
return sub {
my ($tbbinfos, $test) = @_;
my $failed;
my %tickets;
foreach my $file (@{$test->{results}{failed}}) {
if ($files{$file}) {
$tickets{$files{$file}} = 1;
} else {
$failed = 1;
}
}
my %res;
$res{fail_type} = 'known' unless $failed;
$res{tickets} = [ keys %tickets ] if %tickets;
return \%res;
};
}
1;
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