| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Tapper::Reports::Web::Util::Filter::Testplan; |
|
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TAPPER'; |
|
3
|
|
|
|
|
|
|
$Tapper::Reports::Web::Util::Filter::Testplan::VERSION = '5.0.15'; |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
11
|
|
|
11
|
|
76
|
use Moose; |
|
|
11
|
|
|
|
|
25
|
|
|
|
11
|
|
|
|
|
114
|
|
|
9
|
11
|
|
|
11
|
|
70071
|
use Hash::Merge::Simple 'merge'; |
|
|
11
|
|
|
|
|
27
|
|
|
|
11
|
|
|
|
|
2894
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
extends 'Tapper::Reports::Web::Util::Filter'; |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub BUILD{ |
|
14
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
15
|
0
|
|
|
|
|
|
my $args = shift; |
|
16
|
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
$self->dispatch( |
|
18
|
|
|
|
|
|
|
merge($self->dispatch, |
|
19
|
|
|
|
|
|
|
{path => \&path, |
|
20
|
|
|
|
|
|
|
name => \&name, |
|
21
|
|
|
|
|
|
|
}) |
|
22
|
|
|
|
|
|
|
); |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub path |
|
28
|
|
|
|
|
|
|
{ |
|
29
|
0
|
|
|
0
|
0
|
|
my ($self, $filter_condition, $path) = @_; |
|
30
|
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
$path =~ s|\.|/|g; |
|
32
|
0
|
0
|
|
|
|
|
$filter_condition->{early}->{path} = $path ? $path : undef; |
|
33
|
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return $filter_condition; |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub name |
|
39
|
|
|
|
|
|
|
{ |
|
40
|
0
|
|
|
0
|
1
|
|
my ($self, $filter_condition, $name) = @_; |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
|
43
|
0
|
0
|
|
|
|
|
$filter_condition->{early}->{name} = $name ? $name : undef; |
|
44
|
|
|
|
|
|
|
|
|
45
|
0
|
|
|
|
|
|
return $filter_condition; |
|
46
|
|
|
|
|
|
|
} |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__END__ |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=pod |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=encoding UTF-8 |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 NAME |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Tapper::Reports::Web::Util::Filter::Testplan |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
use Tapper::Reports::Web::Util::Filter::Testplan; |
|
66
|
|
|
|
|
|
|
my $filter = Tapper::Reports::Web::Util::Filter::Testplan->new(context => $c); |
|
67
|
|
|
|
|
|
|
my $filter_args = ['path','topic.xen.unstable','days','3']; |
|
68
|
|
|
|
|
|
|
my $allowed_filter_keys = ['path','days']; |
|
69
|
|
|
|
|
|
|
my $searchoptions = $filter->parse_filters($filter_args, $allowed_filter_keys); |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 name |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Filter testplans for a path given in dot format (i.e. topic.xen.unstable |
|
74
|
|
|
|
|
|
|
instead of topic/xen/unstable) |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
@param hash ref - current version of filters |
|
77
|
|
|
|
|
|
|
@param string - path name |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
@return hash ref - updated filters |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head2 name |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Filter testplans for a given name. |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
@param hash ref - current version of filters |
|
86
|
|
|
|
|
|
|
@param string - testplan instance name |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
@return hash ref - updated filters |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 NAME |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Tapper::Reports::Web::Util::Filter::Testplan - Filter utilities for testrun listing |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 AUTHORS |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=over 4 |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item * |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
AMD OSRC Tapper Team <tapper@amd64.org> |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=item * |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Tapper Team <tapper-ops@amazon.com> |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=back |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
This software is Copyright (c) 2020 by Advanced Micro Devices, Inc.. |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
This is free software, licensed under: |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
The (two-clause) FreeBSD License |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=cut |