| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Tapper::Reports::Web::Controller::Tapper::Testruns::Id; |
|
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TAPPER'; |
|
3
|
|
|
|
|
|
|
$Tapper::Reports::Web::Controller::Tapper::Testruns::Id::VERSION = '5.0.13'; |
|
4
|
10
|
|
|
10
|
|
5829
|
use 5.010; |
|
|
10
|
|
|
|
|
24
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
10
|
|
|
10
|
|
43
|
use strict; |
|
|
10
|
|
|
|
|
16
|
|
|
|
10
|
|
|
|
|
202
|
|
|
7
|
10
|
|
|
10
|
|
31
|
use warnings; |
|
|
10
|
|
|
|
|
13
|
|
|
|
10
|
|
|
|
|
276
|
|
|
8
|
10
|
|
|
10
|
|
36
|
use Tapper::Model 'model'; |
|
|
10
|
|
|
|
|
15
|
|
|
|
10
|
|
|
|
|
491
|
|
|
9
|
10
|
|
|
10
|
|
45
|
use Tapper::Reports::Web::Util::Report; |
|
|
10
|
|
|
|
|
13
|
|
|
|
10
|
|
|
|
|
184
|
|
|
10
|
10
|
|
|
10
|
|
38
|
use YAML::Syck; |
|
|
10
|
|
|
|
|
11
|
|
|
|
10
|
|
|
|
|
496
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
10
|
|
|
10
|
|
42
|
use parent 'Tapper::Reports::Web::Controller::Base'; |
|
|
10
|
|
|
|
|
41
|
|
|
|
10
|
|
|
|
|
67
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub auto :Private |
|
16
|
|
|
|
|
|
|
{ |
|
17
|
2
|
|
|
2
|
|
737
|
my ( $self, $c ) = @_; |
|
18
|
|
|
|
|
|
|
|
|
19
|
2
|
|
|
|
|
10
|
$c->forward('/tapper/testruns/id/prepare_navi'); |
|
20
|
10
|
|
|
10
|
|
1069
|
} |
|
|
10
|
|
|
|
|
16
|
|
|
|
10
|
|
|
|
|
56
|
|
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub index :Path :Args(1) |
|
24
|
|
|
|
|
|
|
{ |
|
25
|
2
|
|
|
2
|
0
|
2389
|
my ( $self, $c, $testrun_id ) = @_; |
|
26
|
|
|
|
|
|
|
|
|
27
|
2
|
|
|
|
|
9
|
$c->stash->{reportlist_rgt} = {}; |
|
28
|
|
|
|
|
|
|
|
|
29
|
2
|
|
|
|
|
98
|
eval { |
|
30
|
2
|
|
|
|
|
12
|
$c->stash->{testrun} = $c->model('TestrunDB')->resultset('Testrun')->find($testrun_id); |
|
31
|
|
|
|
|
|
|
}; |
|
32
|
2
|
100
|
66
|
|
|
5547
|
if ($@ or not $c->stash->{testrun}) { |
|
33
|
1
|
|
|
|
|
87
|
$c->response->body(qq(No testrun with id "$testrun_id" found in the database!)); |
|
34
|
1
|
|
|
|
|
36
|
return; |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
|
|
37
|
1
|
50
|
|
|
|
70
|
return unless $c->stash->{testrun}->testrun_scheduling; |
|
38
|
|
|
|
|
|
|
|
|
39
|
1
|
50
|
50
|
|
|
2551
|
$c->stash->{time} = $c->stash->{testrun}->starttime_testrun ? "started at ".$c->stash->{testrun}->starttime_testrun : $c->stash->{testrun}->testrun_scheduling->status." // ".($c->stash->{testrun}->starttime_earliest || ''); |
|
40
|
1
|
50
|
|
|
|
813
|
$c->stash->{hostname} = $c->stash->{testrun}->testrun_scheduling->host ? $c->stash->{testrun}->testrun_scheduling->host->name : "unknown"; |
|
41
|
|
|
|
|
|
|
|
|
42
|
1
|
|
|
|
|
3569
|
$c->stash->{title} = "Testrun $testrun_id: ". $c->stash->{testrun}->topic_name . " @ ".$c->stash->{hostname}; |
|
43
|
1
|
|
|
|
|
166
|
$c->stash->{overview} = $c->forward('/tapper/testruns/get_testrun_overview', [ $c->stash->{testrun} ]); |
|
44
|
|
|
|
|
|
|
|
|
45
|
1
|
|
|
|
|
213
|
my @preconditions_hash = map { $_->precondition_as_hash } $c->stash->{testrun}->ordered_preconditions; |
|
|
2
|
|
|
|
|
16715
|
|
|
46
|
1
|
|
|
|
|
49
|
$YAML::Syck::SortKeys = 1; |
|
47
|
1
|
|
|
|
|
39
|
$c->stash->{precondition_string} = YAML::Syck::Dump(@preconditions_hash); |
|
48
|
|
|
|
|
|
|
|
|
49
|
1
|
|
|
|
|
130
|
my $rgt_reports = $c->model('TestrunDB')->resultset('Report')->search |
|
50
|
|
|
|
|
|
|
( |
|
51
|
|
|
|
|
|
|
{ |
|
52
|
|
|
|
|
|
|
"reportgrouptestrun.testrun_id" => $testrun_id |
|
53
|
|
|
|
|
|
|
}, |
|
54
|
|
|
|
|
|
|
{ order_by => 'me.id desc', |
|
55
|
|
|
|
|
|
|
join => [ 'reportgrouptestrun', 'suite'], |
|
56
|
|
|
|
|
|
|
'+select' => [ 'reportgrouptestrun.testrun_id', 'reportgrouptestrun.primaryreport', 'suite.name', 'suite.type', 'suite.description' ], |
|
57
|
|
|
|
|
|
|
'+as' => [ 'rgt_id', 'rgt_primary', 'suite_name', 'suite_type', 'suite_description' ], |
|
58
|
|
|
|
|
|
|
} |
|
59
|
|
|
|
|
|
|
); |
|
60
|
1
|
|
|
|
|
614
|
my $util_report = Tapper::Reports::Web::Util::Report->new(); |
|
61
|
|
|
|
|
|
|
|
|
62
|
1
|
|
|
|
|
306
|
$c->stash->{reportlist_rgt} = $util_report->prepare_simple_reportlist($c, $rgt_reports); |
|
63
|
1
|
|
|
|
|
60
|
$c->stash->{report} = $c->model('TestrunDB')->resultset('Report')->search |
|
64
|
|
|
|
|
|
|
( |
|
65
|
|
|
|
|
|
|
{ |
|
66
|
|
|
|
|
|
|
"reportgrouptestrun.primaryreport" => 1, |
|
67
|
|
|
|
|
|
|
}, |
|
68
|
|
|
|
|
|
|
{ |
|
69
|
|
|
|
|
|
|
join => [ 'reportgrouptestrun', ] |
|
70
|
|
|
|
|
|
|
} |
|
71
|
|
|
|
|
|
|
); |
|
72
|
10
|
|
|
10
|
|
78390
|
} |
|
|
10
|
|
|
|
|
16
|
|
|
|
10
|
|
|
|
|
45
|
|
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub prepare_navi : Private |
|
75
|
|
|
|
|
|
|
{ |
|
76
|
2
|
|
|
2
|
0
|
784
|
my ( $self, $c, $testrun_id ) = @_; |
|
77
|
|
|
|
|
|
|
|
|
78
|
2
|
|
|
|
|
2
|
my $tr; |
|
79
|
|
|
|
|
|
|
my $job; |
|
80
|
2
|
|
|
|
|
6
|
my $status = 'undefined'; |
|
81
|
2
|
|
|
|
|
27
|
$tr = $c->model('TestrunDB')->resultset('Testrun')->find($testrun_id); |
|
82
|
2
|
100
|
|
|
|
49821
|
$job = $tr->testrun_scheduling if $tr; |
|
83
|
2
|
100
|
|
|
|
3857
|
$status = $job->status if $job; |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
$c->stash->{navi} =[ |
|
86
|
|
|
|
|
|
|
{ |
|
87
|
2
|
50
|
|
|
|
688
|
title => "Testruns by date", |
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
href => "/tapper/testruns/days/2", |
|
89
|
|
|
|
|
|
|
active => 0, |
|
90
|
|
|
|
|
|
|
subnavi => [ |
|
91
|
|
|
|
|
|
|
{ |
|
92
|
|
|
|
|
|
|
title => "today", |
|
93
|
|
|
|
|
|
|
href => "/tapper/testruns/days/1", |
|
94
|
|
|
|
|
|
|
}, |
|
95
|
|
|
|
|
|
|
{ |
|
96
|
|
|
|
|
|
|
title => "1 week", |
|
97
|
|
|
|
|
|
|
href => "/tapper/testruns/days/7", |
|
98
|
|
|
|
|
|
|
}, |
|
99
|
|
|
|
|
|
|
{ |
|
100
|
|
|
|
|
|
|
title => "2 weeks", |
|
101
|
|
|
|
|
|
|
href => "/tapper/testruns/days/14", |
|
102
|
|
|
|
|
|
|
}, |
|
103
|
|
|
|
|
|
|
{ |
|
104
|
|
|
|
|
|
|
title => "3 weeks", |
|
105
|
|
|
|
|
|
|
href => "/tapper/testruns/days/21", |
|
106
|
|
|
|
|
|
|
}, |
|
107
|
|
|
|
|
|
|
{ |
|
108
|
|
|
|
|
|
|
title => "1 month", |
|
109
|
|
|
|
|
|
|
href => "/tapper/testruns/days/30", |
|
110
|
|
|
|
|
|
|
}, |
|
111
|
|
|
|
|
|
|
{ |
|
112
|
|
|
|
|
|
|
title => "2 months", |
|
113
|
|
|
|
|
|
|
href => "/tapper/testruns/days/60", |
|
114
|
|
|
|
|
|
|
}, |
|
115
|
|
|
|
|
|
|
], |
|
116
|
|
|
|
|
|
|
}, |
|
117
|
|
|
|
|
|
|
{ |
|
118
|
|
|
|
|
|
|
title => "Control", |
|
119
|
|
|
|
|
|
|
href => "", |
|
120
|
|
|
|
|
|
|
active => 0, |
|
121
|
|
|
|
|
|
|
subnavi => [ |
|
122
|
|
|
|
|
|
|
($status eq 'finished' |
|
123
|
|
|
|
|
|
|
? { |
|
124
|
|
|
|
|
|
|
title => "Rerun", |
|
125
|
|
|
|
|
|
|
href => "/tapper/testruns/$testrun_id/rerun", |
|
126
|
|
|
|
|
|
|
confirm => 'Do you really want to RERUN this testrun?', |
|
127
|
|
|
|
|
|
|
} |
|
128
|
|
|
|
|
|
|
: ()), |
|
129
|
|
|
|
|
|
|
($status =~ /^(running|schedule|prepare)$/ |
|
130
|
|
|
|
|
|
|
? { |
|
131
|
|
|
|
|
|
|
title => "Cancel", |
|
132
|
|
|
|
|
|
|
href => "/tapper/testruns/$testrun_id/cancel", |
|
133
|
|
|
|
|
|
|
confirm => 'Do you really want to CANCEL this testrun?', |
|
134
|
|
|
|
|
|
|
} |
|
135
|
|
|
|
|
|
|
: ()), |
|
136
|
|
|
|
|
|
|
($status eq 'schedule' |
|
137
|
|
|
|
|
|
|
? { |
|
138
|
|
|
|
|
|
|
title => "Unschedule", |
|
139
|
|
|
|
|
|
|
href => "/tapper/testruns/$testrun_id/pause", |
|
140
|
|
|
|
|
|
|
confirm => 'Do you really want to UNSCHEDULE this testrun?', |
|
141
|
|
|
|
|
|
|
} |
|
142
|
|
|
|
|
|
|
: ()), |
|
143
|
|
|
|
|
|
|
($status eq 'prepare' |
|
144
|
|
|
|
|
|
|
? { |
|
145
|
|
|
|
|
|
|
title => "Reschedule", |
|
146
|
|
|
|
|
|
|
href => "/tapper/testruns/$testrun_id/continue", |
|
147
|
|
|
|
|
|
|
confirm => 'Do you really want to RESCHEDULE this testrun?', |
|
148
|
|
|
|
|
|
|
} |
|
149
|
|
|
|
|
|
|
: ()), |
|
150
|
|
|
|
|
|
|
{ |
|
151
|
|
|
|
|
|
|
title => "Create new testrun", |
|
152
|
|
|
|
|
|
|
href => "/tapper/testruns/create", |
|
153
|
|
|
|
|
|
|
}, |
|
154
|
|
|
|
|
|
|
], |
|
155
|
|
|
|
|
|
|
}, |
|
156
|
|
|
|
|
|
|
]; |
|
157
|
10
|
|
|
10
|
|
9207
|
} |
|
|
10
|
|
|
|
|
18
|
|
|
|
10
|
|
|
|
|
42
|
|
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
1; |
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
__END__ |
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=pod |
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=encoding UTF-8 |
|
166
|
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=head1 NAME |
|
168
|
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
Tapper::Reports::Web::Controller::Tapper::Testruns::Id |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=head1 AUTHORS |
|
172
|
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=over 4 |
|
174
|
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=item * |
|
176
|
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
AMD OSRC Tapper Team <tapper@amd64.org> |
|
178
|
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=item * |
|
180
|
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
Tapper Team <tapper-ops@amazon.com> |
|
182
|
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=back |
|
184
|
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
186
|
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
This software is Copyright (c) 2017 by Advanced Micro Devices, Inc.. |
|
188
|
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
This is free software, licensed under: |
|
190
|
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
The (two-clause) FreeBSD License |
|
192
|
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
=cut |