line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Smoke::App::Options; |
2
|
7
|
|
|
7
|
|
112437
|
use warnings; |
|
7
|
|
|
|
|
26
|
|
|
7
|
|
|
|
|
235
|
|
3
|
7
|
|
|
7
|
|
36
|
use strict; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
261
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.001'; |
6
|
|
|
|
|
|
|
|
7
|
7
|
|
|
7
|
|
487
|
use Test::Smoke::App::AppOption; |
|
7
|
|
|
|
|
15
|
|
|
7
|
|
|
|
|
13595
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Test::Smoke::App::Options - A collection of application configs and config |
12
|
|
|
|
|
|
|
options. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $opt = 'Test::Smoke::App::AppOption'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub synctree_config { # synctree.pl |
19
|
|
|
|
|
|
|
return ( |
20
|
5
|
|
|
5
|
0
|
920
|
main_options => [ |
21
|
|
|
|
|
|
|
sync_type(), |
22
|
|
|
|
|
|
|
], |
23
|
|
|
|
|
|
|
general_options => [ |
24
|
|
|
|
|
|
|
ddir(), |
25
|
|
|
|
|
|
|
], |
26
|
|
|
|
|
|
|
special_options => { |
27
|
|
|
|
|
|
|
git => [ |
28
|
|
|
|
|
|
|
gitbin(), |
29
|
|
|
|
|
|
|
gitorigin(), |
30
|
|
|
|
|
|
|
gitdir(), |
31
|
|
|
|
|
|
|
gitdfbranch(), |
32
|
|
|
|
|
|
|
gitbranchfile(), |
33
|
|
|
|
|
|
|
], |
34
|
|
|
|
|
|
|
rsync => [ |
35
|
|
|
|
|
|
|
rsyncbin(), |
36
|
|
|
|
|
|
|
rsyncopts(), |
37
|
|
|
|
|
|
|
rsyncsource(), |
38
|
|
|
|
|
|
|
], |
39
|
|
|
|
|
|
|
copy => [ |
40
|
|
|
|
|
|
|
cdir() |
41
|
|
|
|
|
|
|
], |
42
|
|
|
|
|
|
|
fsync => [ |
43
|
|
|
|
|
|
|
fdir(), |
44
|
|
|
|
|
|
|
], |
45
|
|
|
|
|
|
|
}, |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub mailer_config { # mailing reports |
50
|
|
|
|
|
|
|
return ( |
51
|
4
|
|
|
4
|
0
|
20
|
main_options => [ |
52
|
|
|
|
|
|
|
mail_type(), |
53
|
|
|
|
|
|
|
], |
54
|
|
|
|
|
|
|
general_options => [ |
55
|
|
|
|
|
|
|
ddir(), |
56
|
|
|
|
|
|
|
to(), |
57
|
|
|
|
|
|
|
cc(), |
58
|
|
|
|
|
|
|
bcc(), |
59
|
|
|
|
|
|
|
ccp5p_onfail(), |
60
|
|
|
|
|
|
|
rptfile(), |
61
|
|
|
|
|
|
|
mail(), |
62
|
|
|
|
|
|
|
report(0), |
63
|
|
|
|
|
|
|
], |
64
|
|
|
|
|
|
|
special_options => { |
65
|
|
|
|
|
|
|
mail => [ mailbin() ], |
66
|
|
|
|
|
|
|
mailx => [ |
67
|
|
|
|
|
|
|
mailxbin(), |
68
|
|
|
|
|
|
|
swcc(), |
69
|
|
|
|
|
|
|
swbcc(), |
70
|
|
|
|
|
|
|
], |
71
|
|
|
|
|
|
|
sendemail => [ |
72
|
|
|
|
|
|
|
sendemailbin(), |
73
|
|
|
|
|
|
|
from(), |
74
|
|
|
|
|
|
|
mserver(), |
75
|
|
|
|
|
|
|
msport(), |
76
|
|
|
|
|
|
|
msuser(), |
77
|
|
|
|
|
|
|
mspass(), |
78
|
|
|
|
|
|
|
], |
79
|
|
|
|
|
|
|
sendmail => [ |
80
|
|
|
|
|
|
|
sendmailbin(), |
81
|
|
|
|
|
|
|
from(), |
82
|
|
|
|
|
|
|
], |
83
|
|
|
|
|
|
|
'Mail::Sendmail' => [ |
84
|
|
|
|
|
|
|
from(), |
85
|
|
|
|
|
|
|
mserver(), |
86
|
|
|
|
|
|
|
msport(), |
87
|
|
|
|
|
|
|
], |
88
|
|
|
|
|
|
|
'MIME::Lite' => [ |
89
|
|
|
|
|
|
|
from(), |
90
|
|
|
|
|
|
|
mserver(), |
91
|
|
|
|
|
|
|
msport(), |
92
|
|
|
|
|
|
|
msuser(), |
93
|
|
|
|
|
|
|
mspass(), |
94
|
|
|
|
|
|
|
], |
95
|
|
|
|
|
|
|
}, |
96
|
|
|
|
|
|
|
); |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub poster_config { # posting to CoreSmokeDB |
100
|
|
|
|
|
|
|
return ( |
101
|
7
|
|
|
7
|
0
|
27
|
main_options => [ |
102
|
|
|
|
|
|
|
poster(), |
103
|
|
|
|
|
|
|
], |
104
|
|
|
|
|
|
|
general_options => [ |
105
|
|
|
|
|
|
|
ddir(), |
106
|
|
|
|
|
|
|
smokedb_url(), |
107
|
|
|
|
|
|
|
jsnfile(), |
108
|
|
|
|
|
|
|
report(0), |
109
|
|
|
|
|
|
|
], |
110
|
|
|
|
|
|
|
special_options => { |
111
|
|
|
|
|
|
|
'LWP::UserAgent' => [ |
112
|
|
|
|
|
|
|
ua_timeout(), |
113
|
|
|
|
|
|
|
], |
114
|
|
|
|
|
|
|
'HTTP::Tiny' => [ |
115
|
|
|
|
|
|
|
ua_timeout(), |
116
|
|
|
|
|
|
|
], |
117
|
|
|
|
|
|
|
'curl' => [ |
118
|
|
|
|
|
|
|
curlbin(), |
119
|
|
|
|
|
|
|
curlargs(), |
120
|
|
|
|
|
|
|
ua_timeout(), |
121
|
|
|
|
|
|
|
], |
122
|
|
|
|
|
|
|
}, |
123
|
|
|
|
|
|
|
); |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
sub reporter_config { # needed for sending out reports |
127
|
|
|
|
|
|
|
return ( |
128
|
6
|
|
|
6
|
0
|
151
|
general_options => [ |
129
|
|
|
|
|
|
|
ddir(), |
130
|
|
|
|
|
|
|
outfile(), |
131
|
|
|
|
|
|
|
rptfile(), |
132
|
|
|
|
|
|
|
jsnfile(), |
133
|
|
|
|
|
|
|
lfile(), |
134
|
|
|
|
|
|
|
cfg(), |
135
|
|
|
|
|
|
|
showcfg(), |
136
|
|
|
|
|
|
|
locale(), |
137
|
|
|
|
|
|
|
defaultenv(), |
138
|
|
|
|
|
|
|
is56x(), |
139
|
|
|
|
|
|
|
skip_tests(), |
140
|
|
|
|
|
|
|
harnessonly(), |
141
|
|
|
|
|
|
|
harness3opts(), |
142
|
|
|
|
|
|
|
hostname(), |
143
|
|
|
|
|
|
|
from(), |
144
|
|
|
|
|
|
|
send_log(), |
145
|
|
|
|
|
|
|
send_out(), |
146
|
|
|
|
|
|
|
user_note(), |
147
|
|
|
|
|
|
|
un_file(), |
148
|
|
|
|
|
|
|
un_position(), |
149
|
|
|
|
|
|
|
], |
150
|
|
|
|
|
|
|
); |
151
|
|
|
|
|
|
|
} |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
sub reposter_config { |
154
|
3
|
|
|
3
|
0
|
2920
|
my %pc = poster_config(); |
155
|
3
|
|
|
|
|
8
|
my $pc_so = $pc{special_options}; |
156
|
|
|
|
|
|
|
return ( |
157
|
3
|
|
|
|
|
12
|
main_options => [ |
158
|
|
|
|
|
|
|
poster(), |
159
|
|
|
|
|
|
|
], |
160
|
|
|
|
|
|
|
general_options => [ |
161
|
|
|
|
|
|
|
adir(), |
162
|
|
|
|
|
|
|
commit_sha(), |
163
|
|
|
|
|
|
|
jsonreport(), |
164
|
|
|
|
|
|
|
max_reports(), |
165
|
|
|
|
|
|
|
smokedb_url(), |
166
|
|
|
|
|
|
|
], |
167
|
|
|
|
|
|
|
special_options => $pc_so, |
168
|
|
|
|
|
|
|
); |
169
|
|
|
|
|
|
|
} |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
sub sendreport_config { # sendreport.pl |
172
|
|
|
|
|
|
|
# merge: mailer_config, poster_config and reporter_config. |
173
|
4
|
|
|
4
|
0
|
1506
|
my %mc = mailer_config(); |
174
|
4
|
|
|
|
|
34
|
my %pc = poster_config(); |
175
|
4
|
|
|
|
|
32
|
my %rc = reporter_config(); |
176
|
4
|
|
|
|
|
38
|
my %g_o; |
177
|
4
|
|
|
|
|
25
|
for my $opt ( @{$mc{general_options}} |
|
4
|
|
|
|
|
35
|
|
178
|
4
|
|
|
|
|
27
|
, @{$pc{general_options}} |
179
|
4
|
|
|
|
|
42
|
, @{$rc{general_options}}) |
180
|
|
|
|
|
|
|
{ |
181
|
128
|
|
66
|
|
|
747
|
$g_o{$opt->name} ||= $opt; |
182
|
|
|
|
|
|
|
} |
183
|
4
|
|
|
|
|
33
|
my %s_o; |
184
|
4
|
|
|
|
|
15
|
for my $so (keys %{$mc{special_options}}) { |
|
4
|
|
|
|
|
104
|
|
185
|
24
|
|
|
|
|
107
|
$s_o{$so} = $mc{special_options}{$so}; |
186
|
|
|
|
|
|
|
} |
187
|
4
|
|
|
|
|
22
|
for my $so (keys %{$pc{special_options}}) { |
|
4
|
|
|
|
|
79
|
|
188
|
12
|
|
|
|
|
41
|
$s_o{$so} = $pc{special_options}{$so}; |
189
|
|
|
|
|
|
|
} |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
return ( |
192
|
4
|
|
|
|
|
36
|
main_options => [mail_type(), poster() ], |
193
|
|
|
|
|
|
|
general_options => [values %g_o, report(0)], |
194
|
|
|
|
|
|
|
special_options => \%s_o, |
195
|
|
|
|
|
|
|
); |
196
|
|
|
|
|
|
|
} |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
sub runsmoke_config { # runsmoke.pl |
199
|
|
|
|
|
|
|
return ( |
200
|
7
|
|
|
7
|
0
|
1348
|
general_options => [ |
201
|
|
|
|
|
|
|
ddir(), |
202
|
|
|
|
|
|
|
outfile(), |
203
|
|
|
|
|
|
|
rptfile(), |
204
|
|
|
|
|
|
|
jsnfile(), |
205
|
|
|
|
|
|
|
cfg(), |
206
|
|
|
|
|
|
|
defaultenv(), |
207
|
|
|
|
|
|
|
force_c_locale(), |
208
|
|
|
|
|
|
|
harness3opts(), |
209
|
|
|
|
|
|
|
harnessonly(), |
210
|
|
|
|
|
|
|
hasharness3(), |
211
|
|
|
|
|
|
|
is56x(), |
212
|
|
|
|
|
|
|
is_vms(), |
213
|
|
|
|
|
|
|
is_win32(), |
214
|
|
|
|
|
|
|
killtime(), |
215
|
|
|
|
|
|
|
locale(), |
216
|
|
|
|
|
|
|
makeopt(), |
217
|
|
|
|
|
|
|
opt_continue(), |
218
|
|
|
|
|
|
|
skip_tests(), |
219
|
|
|
|
|
|
|
testmake(), |
220
|
|
|
|
|
|
|
w32args(), |
221
|
|
|
|
|
|
|
w32cc(), |
222
|
|
|
|
|
|
|
w32make(), |
223
|
|
|
|
|
|
|
pass_option(), |
224
|
|
|
|
|
|
|
], |
225
|
|
|
|
|
|
|
); |
226
|
|
|
|
|
|
|
} |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
sub archiver_config { |
229
|
|
|
|
|
|
|
return ( |
230
|
4
|
|
|
4
|
0
|
165
|
general_options => [ |
231
|
|
|
|
|
|
|
archive(), |
232
|
|
|
|
|
|
|
ddir(), |
233
|
|
|
|
|
|
|
adir(), |
234
|
|
|
|
|
|
|
outfile(), |
235
|
|
|
|
|
|
|
rptfile(), |
236
|
|
|
|
|
|
|
jsnfile(), |
237
|
|
|
|
|
|
|
lfile(), |
238
|
|
|
|
|
|
|
], |
239
|
|
|
|
|
|
|
); |
240
|
|
|
|
|
|
|
} |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
sub smokeperl_config { |
243
|
2
|
|
|
2
|
0
|
958
|
my %stc = synctree_config(); |
244
|
2
|
|
|
|
|
9
|
my %rsc = runsmoke_config(); |
245
|
2
|
|
|
|
|
9
|
my %arc = archiver_config(); |
246
|
2
|
|
|
|
|
11
|
my %src = sendreport_config(); |
247
|
|
|
|
|
|
|
|
248
|
2
|
|
|
|
|
8
|
my %m_o; |
249
|
2
|
|
|
|
|
6
|
for my $opt (@{$stc{main_options}}, @{$rsc{main_options}}, |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
16
|
|
250
|
2
|
|
|
|
|
20
|
@{$arc{main_options}}, @{$src{main_options}}) |
|
2
|
|
|
|
|
25
|
|
251
|
|
|
|
|
|
|
{ |
252
|
6
|
|
33
|
|
|
45
|
$m_o{$opt->name} ||= $opt; |
253
|
|
|
|
|
|
|
} |
254
|
2
|
|
|
|
|
18
|
my %g_o = ( |
255
|
|
|
|
|
|
|
sync()->name => sync(), |
256
|
|
|
|
|
|
|
report()->name => report(), |
257
|
|
|
|
|
|
|
sendreport()->name => sendreport(), |
258
|
|
|
|
|
|
|
archive()->name => archive(), |
259
|
|
|
|
|
|
|
smartsmoke()->name => smartsmoke(), |
260
|
|
|
|
|
|
|
patchlevel()->name => patchlevel(), |
261
|
|
|
|
|
|
|
); |
262
|
2
|
|
|
|
|
12
|
for my $opt (@{$stc{general_options}}, @{$rsc{general_options}}, |
|
2
|
|
|
|
|
17
|
|
|
2
|
|
|
|
|
8
|
|
263
|
2
|
|
|
|
|
6
|
@{$arc{general_options}}, @{$src{general_options}}) |
|
2
|
|
|
|
|
7
|
|
264
|
|
|
|
|
|
|
{ |
265
|
118
|
|
66
|
|
|
416
|
$g_o{$opt->name} ||= $opt; |
266
|
|
|
|
|
|
|
} |
267
|
2
|
|
|
|
|
9
|
my %s_o; |
268
|
2
|
|
|
|
|
7
|
for my $so (keys %{$stc{special_options}}) { |
|
2
|
|
|
|
|
39
|
|
269
|
8
|
|
|
|
|
28
|
$s_o{$so} = $stc{special_options}{$so}; |
270
|
|
|
|
|
|
|
} |
271
|
2
|
|
|
|
|
5
|
for my $so (keys %{$rsc{special_options}}) { |
|
2
|
|
|
|
|
21
|
|
272
|
0
|
|
|
|
|
0
|
$s_o{$so} = $rsc{special_options}{$so}; |
273
|
|
|
|
|
|
|
} |
274
|
2
|
|
|
|
|
5
|
for my $so (keys %{$arc{special_options}}) { |
|
2
|
|
|
|
|
10
|
|
275
|
0
|
|
|
|
|
0
|
$s_o{$so} = $arc{special_options}{$so}; |
276
|
|
|
|
|
|
|
} |
277
|
2
|
|
|
|
|
8
|
for my $so (keys %{$src{special_options}}) { |
|
2
|
|
|
|
|
12
|
|
278
|
18
|
|
|
|
|
36
|
$s_o{$so} = $src{special_options}{$so}; |
279
|
|
|
|
|
|
|
} |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
return ( |
282
|
6
|
|
|
|
|
30
|
main_options => [sort { $a->name cmp $b->name } values %m_o], |
283
|
2
|
|
|
|
|
27
|
general_options => [sort { $a->name cmp $b->name } values %g_o], |
|
389
|
|
|
|
|
1180
|
|
284
|
|
|
|
|
|
|
special_options => { %s_o }, |
285
|
|
|
|
|
|
|
); |
286
|
|
|
|
|
|
|
} |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
sub w32configure_config { |
289
|
|
|
|
|
|
|
return ( |
290
|
0
|
|
|
0
|
0
|
0
|
general_options => [ |
291
|
|
|
|
|
|
|
ddir(), |
292
|
|
|
|
|
|
|
w32cc(), |
293
|
|
|
|
|
|
|
w32make(), |
294
|
|
|
|
|
|
|
w32args(), |
295
|
|
|
|
|
|
|
], |
296
|
|
|
|
|
|
|
); |
297
|
|
|
|
|
|
|
} |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
sub configsmoke_config { |
300
|
|
|
|
|
|
|
return ( |
301
|
0
|
|
|
0
|
0
|
0
|
general_options => [ |
302
|
|
|
|
|
|
|
minus_des() |
303
|
|
|
|
|
|
|
] |
304
|
|
|
|
|
|
|
); |
305
|
|
|
|
|
|
|
} |
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
sub smokestatus_config { |
308
|
|
|
|
|
|
|
return ( |
309
|
0
|
|
|
0
|
0
|
0
|
general_options => [ |
310
|
|
|
|
|
|
|
ddir(), |
311
|
|
|
|
|
|
|
outfile(), |
312
|
|
|
|
|
|
|
cfg(), |
313
|
|
|
|
|
|
|
], |
314
|
|
|
|
|
|
|
); |
315
|
|
|
|
|
|
|
} |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
########################################################### |
318
|
|
|
|
|
|
|
##### Individual options ##### |
319
|
|
|
|
|
|
|
########################################################### |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
sub adir { |
322
|
|
|
|
|
|
|
return $opt->new( |
323
|
|
|
|
|
|
|
name => 'adir', |
324
|
|
|
|
|
|
|
option => '=s', |
325
|
|
|
|
|
|
|
default => '', |
326
|
|
|
|
|
|
|
helptext => "Directory to archive the smoker files in.", |
327
|
|
|
|
|
|
|
configtext => "Which directory should be used for the archives? |
328
|
|
|
|
|
|
|
\t(Make empty for no archiving)", |
329
|
|
|
|
|
|
|
configtype => 'prompt_dir', |
330
|
|
|
|
|
|
|
configdft => sub { |
331
|
0
|
|
|
0
|
|
0
|
my $app = shift; |
332
|
0
|
|
|
|
|
0
|
require File::Spec; |
333
|
0
|
|
|
|
|
0
|
File::Spec->catdir('logs', $app->prefix); |
334
|
|
|
|
|
|
|
}, |
335
|
7
|
|
|
7
|
0
|
58
|
); |
336
|
|
|
|
|
|
|
} |
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
sub archive { |
339
|
8
|
|
|
8
|
0
|
51
|
return $opt->new( |
340
|
|
|
|
|
|
|
name => 'archive', |
341
|
|
|
|
|
|
|
option => '!', |
342
|
|
|
|
|
|
|
default => 1, |
343
|
|
|
|
|
|
|
helptext => "Archive the reports after smoking.", |
344
|
|
|
|
|
|
|
); |
345
|
|
|
|
|
|
|
} |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
sub bcc { |
348
|
|
|
|
|
|
|
return $opt->new( |
349
|
|
|
|
|
|
|
name => 'bcc', |
350
|
|
|
|
|
|
|
option => '=s', |
351
|
|
|
|
|
|
|
default => '', |
352
|
|
|
|
|
|
|
helptext => 'Where to send a bcc of the reports.', |
353
|
|
|
|
|
|
|
allow => [ undef, '', qr/@/ ], |
354
|
|
|
|
|
|
|
configtype => 'prompt', |
355
|
|
|
|
|
|
|
configtext => 'This is the email address used to send BlindCarbonCopy:', |
356
|
0
|
|
|
0
|
|
0
|
configdft => sub {''}, |
357
|
4
|
|
|
4
|
0
|
52
|
); |
358
|
|
|
|
|
|
|
} |
359
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
sub cc { |
361
|
|
|
|
|
|
|
return $opt->new( |
362
|
|
|
|
|
|
|
name => 'cc', |
363
|
|
|
|
|
|
|
option => '=s', |
364
|
|
|
|
|
|
|
default => '', |
365
|
|
|
|
|
|
|
helptext => 'Where to send a cc of the reports.', |
366
|
|
|
|
|
|
|
allow => [ undef, '', qr/@/ ], |
367
|
|
|
|
|
|
|
configtype => 'prompt', |
368
|
|
|
|
|
|
|
configtext => 'This is the email address used to send CarbonCopy:', |
369
|
0
|
|
|
0
|
|
0
|
configdft => sub {''}, |
370
|
4
|
|
|
4
|
0
|
67
|
); |
371
|
|
|
|
|
|
|
} |
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
sub ccp5p_onfail { |
374
|
4
|
|
|
4
|
0
|
19
|
return $opt->new( |
375
|
|
|
|
|
|
|
name => 'ccp5p_onfail', |
376
|
|
|
|
|
|
|
option => '!', |
377
|
|
|
|
|
|
|
default => 0, |
378
|
|
|
|
|
|
|
helptext => 'Include the p5p-mailinglist in CC.', |
379
|
|
|
|
|
|
|
); |
380
|
|
|
|
|
|
|
} |
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
sub cdir { # cdir => ddir |
383
|
5
|
|
|
5
|
0
|
33
|
return $opt->new( |
384
|
|
|
|
|
|
|
name => 'cdir', |
385
|
|
|
|
|
|
|
option => '=s', |
386
|
|
|
|
|
|
|
helptext => "The local directory from where to copy the perlsources.", |
387
|
|
|
|
|
|
|
); |
388
|
|
|
|
|
|
|
} |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
sub cfg { |
391
|
|
|
|
|
|
|
return $opt->new( |
392
|
|
|
|
|
|
|
name => 'cfg', |
393
|
|
|
|
|
|
|
option => '=s', |
394
|
|
|
|
|
|
|
default => undef, |
395
|
|
|
|
|
|
|
helptext => "The name of the BuildCFG file.", |
396
|
|
|
|
|
|
|
configtext => "Which build configureations file would you like to use?", |
397
|
|
|
|
|
|
|
configtype => 'prompt_file', |
398
|
|
|
|
|
|
|
configfnex => 1, |
399
|
|
|
|
|
|
|
configdft => sub { |
400
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
401
|
7
|
|
|
7
|
|
61
|
use File::Spec; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
2178
|
|
402
|
0
|
|
|
|
|
0
|
File::Spec->rel2abs($self->prefix . ".buildcfg"); |
403
|
|
|
|
|
|
|
}, |
404
|
13
|
|
|
13
|
0
|
137
|
); |
405
|
|
|
|
|
|
|
} |
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
sub commit_sha { |
408
|
|
|
|
|
|
|
return $opt->new( |
409
|
|
|
|
|
|
|
name => 'commit_sha', |
410
|
|
|
|
|
|
|
option => 'sha=s@', |
411
|
|
|
|
|
|
|
allow => sub { |
412
|
3
|
|
|
3
|
|
9
|
my $values = shift; |
413
|
3
|
|
|
|
|
11
|
my $ok = 1; |
414
|
3
|
|
33
|
|
|
25
|
$ok &&= m{^ [0-9a-f]+ $}x for @$values; |
415
|
3
|
|
|
|
|
13
|
return $ok; |
416
|
|
|
|
|
|
|
}, |
417
|
3
|
|
|
3
|
0
|
18
|
default => [ ], |
418
|
|
|
|
|
|
|
helptext => "A (partial) commit SHA (repeatable!)", |
419
|
|
|
|
|
|
|
); |
420
|
|
|
|
|
|
|
} |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
sub curlargs { |
423
|
7
|
|
|
7
|
0
|
41
|
return $opt->new( |
424
|
|
|
|
|
|
|
name => 'curlargs', |
425
|
|
|
|
|
|
|
option => '=s@', |
426
|
|
|
|
|
|
|
default => [ ], |
427
|
|
|
|
|
|
|
helptext => "Extra switches to pass to curl (repeatable!)", |
428
|
|
|
|
|
|
|
); |
429
|
|
|
|
|
|
|
} |
430
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
sub curlbin { |
432
|
|
|
|
|
|
|
return $opt->new( |
433
|
|
|
|
|
|
|
name => 'curlbin', |
434
|
|
|
|
|
|
|
option => '=s', |
435
|
|
|
|
|
|
|
default => 'curl', |
436
|
|
|
|
|
|
|
helptext => "The fqp for the curl program.", |
437
|
|
|
|
|
|
|
configtext => "Which 'curl' binary do you want to use?", |
438
|
0
|
|
|
0
|
|
0
|
configdft => sub { (_helper(whereis => ['curl'])->())->[0] }, |
439
|
7
|
|
|
7
|
0
|
69
|
configord => 3, |
440
|
|
|
|
|
|
|
); |
441
|
|
|
|
|
|
|
} |
442
|
|
|
|
|
|
|
|
443
|
|
|
|
|
|
|
sub ddir { |
444
|
|
|
|
|
|
|
return $opt->new( |
445
|
|
|
|
|
|
|
name => 'ddir', |
446
|
|
|
|
|
|
|
option => 'd=s', |
447
|
|
|
|
|
|
|
helptext => 'Directory where perl is smoked.', |
448
|
|
|
|
|
|
|
configtext => "Where would you like the new source-tree?", |
449
|
|
|
|
|
|
|
configtype => 'prompt_dir', |
450
|
|
|
|
|
|
|
configdft => sub { |
451
|
7
|
|
|
7
|
|
55
|
use File::Spec; |
|
7
|
|
|
|
|
29
|
|
|
7
|
|
|
|
|
3506
|
|
452
|
0
|
|
|
0
|
|
0
|
File::Spec->catdir(File::Spec->rel2abs(File::Spec->updir), 'perl-current'); |
453
|
|
|
|
|
|
|
}, |
454
|
33
|
|
|
33
|
0
|
290
|
); |
455
|
|
|
|
|
|
|
} |
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
sub defaultenv { |
458
|
|
|
|
|
|
|
return $opt->new( |
459
|
|
|
|
|
|
|
name => 'defaultenv', |
460
|
|
|
|
|
|
|
option => '!', |
461
|
|
|
|
|
|
|
default => 0, |
462
|
|
|
|
|
|
|
helptext => "Do not set the test suite environment to locale.", |
463
|
|
|
|
|
|
|
configtext => "Run the test suite without \$ENV{PERLIO}?", |
464
|
|
|
|
|
|
|
configtype => 'prompt_yn', |
465
|
0
|
|
|
0
|
|
0
|
configalt => sub { [qw/ N y /] }, |
466
|
0
|
|
|
0
|
|
0
|
configdft => sub {'n'}, |
467
|
13
|
|
|
13
|
0
|
137
|
); |
468
|
|
|
|
|
|
|
} |
469
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
sub fdir { # mdir => fdir => ddir |
471
|
5
|
|
|
5
|
0
|
25
|
return $opt->new( |
472
|
|
|
|
|
|
|
name => 'fdir', |
473
|
|
|
|
|
|
|
option => '=s', |
474
|
|
|
|
|
|
|
helptext => "The local directory to build the hardlink Forest from.", |
475
|
|
|
|
|
|
|
); |
476
|
|
|
|
|
|
|
} |
477
|
|
|
|
|
|
|
|
478
|
|
|
|
|
|
|
sub from { |
479
|
|
|
|
|
|
|
return $opt->new( |
480
|
|
|
|
|
|
|
name => 'from', |
481
|
|
|
|
|
|
|
option => '=s', |
482
|
|
|
|
|
|
|
default => '', |
483
|
|
|
|
|
|
|
allow => [ '', qr/@/ ], |
484
|
|
|
|
|
|
|
helptext => 'Where to send the reports from.', |
485
|
|
|
|
|
|
|
configtype => 'prompt', |
486
|
|
|
|
|
|
|
configtext => 'This is the email address used to send FROM:', |
487
|
0
|
|
|
0
|
|
0
|
configdft => sub {''}, |
488
|
22
|
|
|
22
|
0
|
336
|
); |
489
|
|
|
|
|
|
|
} |
490
|
|
|
|
|
|
|
|
491
|
|
|
|
|
|
|
sub fsync { # How to sync the mdir for Forest. |
492
|
0
|
|
|
0
|
0
|
0
|
my $s = sync_type(); |
493
|
0
|
|
|
|
|
0
|
$s->name('fsync'); |
494
|
0
|
|
|
|
|
0
|
return $s; |
495
|
|
|
|
|
|
|
} |
496
|
|
|
|
|
|
|
|
497
|
|
|
|
|
|
|
sub force_c_locale { |
498
|
|
|
|
|
|
|
return $opt->new( |
499
|
|
|
|
|
|
|
name => 'force_c_locale', |
500
|
|
|
|
|
|
|
default => 0, |
501
|
|
|
|
|
|
|
helptext => "Run test suite under the C locale only.", |
502
|
|
|
|
|
|
|
configtext => "Should \$ENV{LC_ALL} be forced to 'C'?", |
503
|
|
|
|
|
|
|
configtype => 'prompt_yn', |
504
|
0
|
|
|
0
|
|
0
|
configalt => sub { [qw/ N y /] }, |
505
|
0
|
|
|
0
|
|
0
|
configdft => sub {'n'}, |
506
|
7
|
|
|
7
|
0
|
71
|
); |
507
|
|
|
|
|
|
|
} |
508
|
|
|
|
|
|
|
|
509
|
|
|
|
|
|
|
sub gitbin { |
510
|
|
|
|
|
|
|
return $opt->new( |
511
|
|
|
|
|
|
|
name => 'gitbin', |
512
|
|
|
|
|
|
|
option => '=s', |
513
|
|
|
|
|
|
|
default => 'git', |
514
|
|
|
|
|
|
|
helptext => "The name of the 'git' program.", |
515
|
|
|
|
|
|
|
configtext => "Which 'git' binary do you want to use?", |
516
|
|
|
|
|
|
|
configtype => 'prompt_file', |
517
|
0
|
|
|
0
|
|
0
|
configdft => sub { (_helper(whereis => ['git'])->())->[0] }, |
518
|
5
|
|
|
5
|
0
|
52
|
configord => 1, |
519
|
|
|
|
|
|
|
); |
520
|
|
|
|
|
|
|
} |
521
|
|
|
|
|
|
|
|
522
|
|
|
|
|
|
|
sub gitorigin { |
523
|
|
|
|
|
|
|
return $opt->new( |
524
|
|
|
|
|
|
|
name => 'gitorigin', |
525
|
|
|
|
|
|
|
option => '=s', |
526
|
|
|
|
|
|
|
default => 'https://github.com/Perl/perl5.git', |
527
|
|
|
|
|
|
|
helptext => "The remote location of the git repository.", |
528
|
|
|
|
|
|
|
configtext => "Where is your main Git repository?", |
529
|
0
|
|
|
0
|
|
0
|
configalt => sub { [] }, |
530
|
5
|
|
|
5
|
0
|
43
|
configord => 2, |
531
|
|
|
|
|
|
|
); |
532
|
|
|
|
|
|
|
} |
533
|
|
|
|
|
|
|
|
534
|
|
|
|
|
|
|
sub gitdir { |
535
|
|
|
|
|
|
|
return $opt->new( |
536
|
|
|
|
|
|
|
name => 'gitdir', |
537
|
|
|
|
|
|
|
option => '=s', |
538
|
|
|
|
|
|
|
default => 'perl-from-github', |
539
|
|
|
|
|
|
|
helptext => "The local directory of the git repository.", |
540
|
|
|
|
|
|
|
configtext => "Where do I put the main Git repository?", |
541
|
|
|
|
|
|
|
configtype => 'prompt_dir', |
542
|
0
|
|
|
0
|
|
0
|
configalt => sub { [] }, |
543
|
|
|
|
|
|
|
configdft => sub { |
544
|
7
|
|
|
7
|
|
63
|
use File::Spec; |
|
7
|
|
|
|
|
17
|
|
|
7
|
|
|
|
|
2919
|
|
545
|
0
|
|
|
0
|
|
0
|
File::Spec->catfile( |
546
|
|
|
|
|
|
|
File::Spec->rel2abs(File::Spec->updir), |
547
|
|
|
|
|
|
|
'perl-from-github' |
548
|
|
|
|
|
|
|
); |
549
|
|
|
|
|
|
|
}, |
550
|
5
|
|
|
5
|
0
|
57
|
configord => 3, |
551
|
|
|
|
|
|
|
); |
552
|
|
|
|
|
|
|
} |
553
|
|
|
|
|
|
|
|
554
|
|
|
|
|
|
|
sub gitdfbranch { |
555
|
|
|
|
|
|
|
return $opt->new( |
556
|
|
|
|
|
|
|
name => 'gitdfbranch', |
557
|
|
|
|
|
|
|
option => '=s', |
558
|
|
|
|
|
|
|
default => 'blead', |
559
|
|
|
|
|
|
|
helptext => "The name of the gitbranch you smoke.", |
560
|
|
|
|
|
|
|
configtext => "Which branch should be smoked by default?", |
561
|
|
|
|
|
|
|
configtype => 'prompt', |
562
|
0
|
|
|
0
|
|
0
|
configalt => sub { [] }, |
563
|
5
|
|
|
5
|
0
|
65
|
configord => 4, |
564
|
|
|
|
|
|
|
); |
565
|
|
|
|
|
|
|
} |
566
|
|
|
|
|
|
|
|
567
|
|
|
|
|
|
|
sub gitbranchfile { |
568
|
|
|
|
|
|
|
return $opt->new( |
569
|
|
|
|
|
|
|
name => 'gitbranchfile', |
570
|
|
|
|
|
|
|
option => '=s', |
571
|
|
|
|
|
|
|
default => '', |
572
|
|
|
|
|
|
|
helptext => "The name of the file where the gitbranch is stored.", |
573
|
|
|
|
|
|
|
configtext => "File name to put branch name for smoking in?", |
574
|
|
|
|
|
|
|
configtype => 'prompt_file', |
575
|
0
|
|
|
0
|
|
0
|
configalt => sub { [] }, |
576
|
0
|
|
|
0
|
|
0
|
configdft => sub { my $self = shift; return $self->prefix . ".gitbranch" }, |
|
0
|
|
|
|
|
0
|
|
577
|
5
|
|
|
5
|
0
|
68
|
configfnex => 1, |
578
|
|
|
|
|
|
|
configord => 5, |
579
|
|
|
|
|
|
|
); |
580
|
|
|
|
|
|
|
} |
581
|
|
|
|
|
|
|
|
582
|
|
|
|
|
|
|
sub harness_destruct { |
583
|
0
|
|
|
0
|
0
|
0
|
return $opt->new( |
584
|
|
|
|
|
|
|
name => 'harness_destruct', |
585
|
|
|
|
|
|
|
option => 'harness-destruct=i', |
586
|
|
|
|
|
|
|
default => 2, |
587
|
|
|
|
|
|
|
helptext => "Sets \$ENV{PERL_DESTRUCT_LEVEL} for 'make test_harness'.", |
588
|
|
|
|
|
|
|
); |
589
|
|
|
|
|
|
|
} |
590
|
|
|
|
|
|
|
|
591
|
|
|
|
|
|
|
sub harness3opts { |
592
|
|
|
|
|
|
|
return $opt->new( |
593
|
|
|
|
|
|
|
name => 'harness3opts', |
594
|
|
|
|
|
|
|
option => '=s', |
595
|
|
|
|
|
|
|
default => '', |
596
|
|
|
|
|
|
|
helptext => "Extra options to pass to harness v3+.", |
597
|
|
|
|
|
|
|
configtext => "Extra options for Test::Harness 3 |
598
|
|
|
|
|
|
|
\tFor parellel testing use; 'j5'", |
599
|
0
|
|
|
0
|
|
0
|
configdft => sub {''}, |
600
|
13
|
|
|
13
|
0
|
86
|
); |
601
|
|
|
|
|
|
|
} |
602
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
sub harnessonly { |
604
|
|
|
|
|
|
|
return $opt->new( |
605
|
|
|
|
|
|
|
name => 'harnessonly', |
606
|
|
|
|
|
|
|
option => '!', |
607
|
|
|
|
|
|
|
default => 0, |
608
|
|
|
|
|
|
|
helptext => "Run test suite as 'make test_harness' (not make test).", |
609
|
|
|
|
|
|
|
configtext => "Use harness only (skip TEST)?", |
610
|
|
|
|
|
|
|
configtype => 'prompt_yn', |
611
|
0
|
|
|
0
|
|
0
|
configalt => sub { [qw/ y N /] }, |
612
|
0
|
|
|
0
|
|
0
|
configdft => sub {'n'}, |
613
|
13
|
|
|
13
|
0
|
144
|
); |
614
|
|
|
|
|
|
|
} |
615
|
|
|
|
|
|
|
|
616
|
|
|
|
|
|
|
sub hasharness3 { |
617
|
7
|
|
|
7
|
0
|
42
|
return $opt->new( |
618
|
|
|
|
|
|
|
name => 'hasharness3', |
619
|
|
|
|
|
|
|
option => '=i', |
620
|
|
|
|
|
|
|
default => 1, |
621
|
|
|
|
|
|
|
helptext => "Internal option for Test::Smoke::Smoker.", |
622
|
|
|
|
|
|
|
); |
623
|
|
|
|
|
|
|
} |
624
|
|
|
|
|
|
|
|
625
|
|
|
|
|
|
|
sub hdir { # hdir => ddir |
626
|
0
|
|
|
0
|
0
|
0
|
return $opt->new( |
627
|
|
|
|
|
|
|
name => 'hdir', |
628
|
|
|
|
|
|
|
option => '=s', |
629
|
|
|
|
|
|
|
helptext => "The local directory to hardlink from.", |
630
|
|
|
|
|
|
|
); |
631
|
|
|
|
|
|
|
} |
632
|
|
|
|
|
|
|
|
633
|
|
|
|
|
|
|
sub hostname { |
634
|
7
|
|
|
7
|
|
2465
|
use System::Info; |
|
7
|
|
|
|
|
90989
|
|
|
7
|
|
|
|
|
22155
|
|
635
|
6
|
|
|
6
|
0
|
37
|
my $hostname = System::Info::si_uname('n'); |
636
|
6
|
|
|
|
|
101531
|
return $opt->new( |
637
|
|
|
|
|
|
|
name => 'hostname', |
638
|
|
|
|
|
|
|
option => '=s', |
639
|
|
|
|
|
|
|
deafult => undef, |
640
|
|
|
|
|
|
|
helptext => 'Use the hostname option to override System::Info->hostname', |
641
|
|
|
|
|
|
|
configtext => "Use this option to override the default hostname. |
642
|
|
|
|
|
|
|
\tLeave empty for default ($hostname)", |
643
|
|
|
|
|
|
|
); |
644
|
|
|
|
|
|
|
} |
645
|
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
sub is56x { |
647
|
13
|
|
|
13
|
0
|
72
|
return $opt->new( |
648
|
|
|
|
|
|
|
name => 'is56x', |
649
|
|
|
|
|
|
|
option => '!', |
650
|
|
|
|
|
|
|
helptext => "Are we smoking perl maint-5.6?", |
651
|
|
|
|
|
|
|
); |
652
|
|
|
|
|
|
|
} |
653
|
|
|
|
|
|
|
|
654
|
|
|
|
|
|
|
sub is_vms { |
655
|
7
|
|
|
7
|
0
|
81
|
return $opt->new( |
656
|
|
|
|
|
|
|
name => 'is_vms', |
657
|
|
|
|
|
|
|
default => ($^O eq 'VMS'), |
658
|
|
|
|
|
|
|
helptext => "Internal, shows we're on VMS", |
659
|
|
|
|
|
|
|
); |
660
|
|
|
|
|
|
|
} |
661
|
|
|
|
|
|
|
|
662
|
|
|
|
|
|
|
sub is_win32 { |
663
|
7
|
|
|
7
|
0
|
48
|
return $opt->new( |
664
|
|
|
|
|
|
|
name => 'is_win32', |
665
|
|
|
|
|
|
|
default => ($^O eq 'MSWin32'), |
666
|
|
|
|
|
|
|
helptext => "Internal, shows we're on MSWin32", |
667
|
|
|
|
|
|
|
); |
668
|
|
|
|
|
|
|
} |
669
|
|
|
|
|
|
|
|
670
|
|
|
|
|
|
|
sub jsnfile { |
671
|
24
|
|
|
24
|
0
|
104
|
return $opt->new( |
672
|
|
|
|
|
|
|
name => 'jsnfile', |
673
|
|
|
|
|
|
|
option => '=s', |
674
|
|
|
|
|
|
|
default => 'mktest.jsn', |
675
|
|
|
|
|
|
|
helptext => 'Name of the file to store the JSON report in.', |
676
|
|
|
|
|
|
|
); |
677
|
|
|
|
|
|
|
} |
678
|
|
|
|
|
|
|
|
679
|
|
|
|
|
|
|
sub jsonreport { |
680
|
3
|
|
|
3
|
0
|
14
|
return $opt->new( |
681
|
|
|
|
|
|
|
name => 'jsonreport', |
682
|
|
|
|
|
|
|
option => '=s', |
683
|
|
|
|
|
|
|
default => undef, |
684
|
|
|
|
|
|
|
helptext => "Name of json report file to re-post to the server" |
685
|
|
|
|
|
|
|
. " (Takes precedence over '--adir' and '--sha')", |
686
|
|
|
|
|
|
|
); |
687
|
|
|
|
|
|
|
} |
688
|
|
|
|
|
|
|
|
689
|
|
|
|
|
|
|
sub killtime { |
690
|
|
|
|
|
|
|
return $opt->new( |
691
|
|
|
|
|
|
|
name => 'killtime', |
692
|
|
|
|
|
|
|
option => '=s', |
693
|
|
|
|
|
|
|
default => '', |
694
|
|
|
|
|
|
|
allow => [undef, '', qr/^\+?[0-9]{1,2}:[0-9]{2}$/], |
695
|
|
|
|
|
|
|
helptext => "The absolute or relative time the smoke may run.", |
696
|
|
|
|
|
|
|
configtext => <<"EOT", |
697
|
|
|
|
|
|
|
Should this smoke be aborted on/after a specific time? |
698
|
|
|
|
|
|
|
\tuse HH:MM to specify a point in time (24 hour notation) |
699
|
|
|
|
|
|
|
\tuse +HH:MM to specify a duration |
700
|
|
|
|
|
|
|
\tleave empty to finish the smoke without aborting |
701
|
|
|
|
|
|
|
EOT |
702
|
0
|
|
|
0
|
|
0
|
configdft => sub { "" }, |
703
|
7
|
|
|
7
|
0
|
102
|
); |
704
|
|
|
|
|
|
|
} |
705
|
|
|
|
|
|
|
|
706
|
|
|
|
|
|
|
sub lfile { |
707
|
10
|
|
|
10
|
0
|
51
|
return $opt->new( |
708
|
|
|
|
|
|
|
name => 'lfile', |
709
|
|
|
|
|
|
|
option => '=s', |
710
|
|
|
|
|
|
|
default => '', |
711
|
|
|
|
|
|
|
helptext => 'Name of the file to store the smoke log in.', |
712
|
|
|
|
|
|
|
); |
713
|
|
|
|
|
|
|
} |
714
|
|
|
|
|
|
|
|
715
|
|
|
|
|
|
|
sub locale { |
716
|
13
|
|
|
13
|
0
|
95
|
return $opt->new( |
717
|
|
|
|
|
|
|
name => 'locale', |
718
|
|
|
|
|
|
|
option => '=s', |
719
|
|
|
|
|
|
|
default => '', |
720
|
|
|
|
|
|
|
allow => [undef, '', qr{utf-?8$}i], |
721
|
|
|
|
|
|
|
helptext => "Choose a locale to run the test suite under.", |
722
|
|
|
|
|
|
|
configtext => "What locale should be used for extra testing? |
723
|
|
|
|
|
|
|
\t(Leave empty for none)", |
724
|
|
|
|
|
|
|
); |
725
|
|
|
|
|
|
|
} |
726
|
|
|
|
|
|
|
|
727
|
|
|
|
|
|
|
sub mail { |
728
|
|
|
|
|
|
|
return $opt->new( |
729
|
|
|
|
|
|
|
name => 'mail', |
730
|
|
|
|
|
|
|
option => '!', |
731
|
|
|
|
|
|
|
allow => [ 0, 1 ], |
732
|
|
|
|
|
|
|
default => 0, |
733
|
|
|
|
|
|
|
helptext => "Send report via mail.", |
734
|
|
|
|
|
|
|
configtext => 'The existence of the mailing-list is not guarenteed', |
735
|
|
|
|
|
|
|
configtype => 'prompt_yn', |
736
|
0
|
|
|
0
|
|
0
|
configalt => sub { [qw/ y N /] }, |
737
|
0
|
|
|
0
|
|
0
|
configdft => sub {'n'}, |
738
|
4
|
|
|
4
|
0
|
46
|
); |
739
|
|
|
|
|
|
|
} |
740
|
|
|
|
|
|
|
|
741
|
|
|
|
|
|
|
sub mail_type { |
742
|
|
|
|
|
|
|
my $mail_type = $opt->new( |
743
|
|
|
|
|
|
|
name => 'mail_type', |
744
|
|
|
|
|
|
|
option => 'mailer=s', |
745
|
|
|
|
|
|
|
allow => [qw/sendmail mail mailx sendemail Mail::Sendmail MIME::Lite/], |
746
|
|
|
|
|
|
|
default => 'Mail::Sendmail', |
747
|
|
|
|
|
|
|
helptext => "The type of mailsystem to use.", |
748
|
|
|
|
|
|
|
configalt => _helper('get_avail_mailers'), |
749
|
0
|
|
|
0
|
|
0
|
configdft => sub { (_helper('get_avail_mailers')->())[0] }, |
750
|
8
|
|
|
8
|
0
|
84
|
); |
751
|
|
|
|
|
|
|
} |
752
|
|
|
|
|
|
|
|
753
|
|
|
|
|
|
|
sub mailbin { |
754
|
|
|
|
|
|
|
return $opt->new( |
755
|
|
|
|
|
|
|
name => 'mailbin', |
756
|
|
|
|
|
|
|
option => '=s', |
757
|
|
|
|
|
|
|
default => 'mail', |
758
|
|
|
|
|
|
|
helptext => "The name of the 'mail' program.", |
759
|
|
|
|
|
|
|
configtext => 'The fully qualified name of the executable.', |
760
|
0
|
|
|
0
|
|
0
|
configdft => sub { (_helper(whereis => ['mail'])->())->[0] }, |
761
|
4
|
|
|
4
|
0
|
64
|
); |
762
|
|
|
|
|
|
|
} |
763
|
|
|
|
|
|
|
|
764
|
|
|
|
|
|
|
sub mailxbin { |
765
|
|
|
|
|
|
|
return $opt->new( |
766
|
|
|
|
|
|
|
name => 'mailxbin', |
767
|
|
|
|
|
|
|
option => '=s', |
768
|
|
|
|
|
|
|
default => 'mailx', |
769
|
|
|
|
|
|
|
helptext => "The name of the 'mailx' program.", |
770
|
|
|
|
|
|
|
configtext => 'The fully qualified name of the executable.', |
771
|
0
|
|
|
0
|
|
0
|
configdft => sub { (_helper(whereis => ['mailx'])->())->[0] }, |
772
|
4
|
|
|
4
|
0
|
52
|
); |
773
|
|
|
|
|
|
|
} |
774
|
|
|
|
|
|
|
|
775
|
|
|
|
|
|
|
sub makeopt { |
776
|
7
|
|
|
7
|
0
|
100
|
require Config; |
777
|
|
|
|
|
|
|
return $opt->new( |
778
|
|
|
|
|
|
|
name => 'makeopt', |
779
|
|
|
|
|
|
|
option => '=s', |
780
|
|
|
|
|
|
|
default => '', |
781
|
|
|
|
|
|
|
helptext => "Extra option to pass to make.", |
782
|
|
|
|
|
|
|
configtext => "Specify extra arguments for '$Config::Config{make}'\n" |
783
|
|
|
|
|
|
|
. "\t(for the 'build' and 'test_prep' steps)", |
784
|
0
|
|
|
0
|
|
0
|
configdft => sub { '' }, |
785
|
7
|
|
|
|
|
403
|
); |
786
|
|
|
|
|
|
|
} |
787
|
|
|
|
|
|
|
|
788
|
|
|
|
|
|
|
sub max_reports { |
789
|
3
|
|
|
3
|
0
|
9
|
return $opt->new( |
790
|
|
|
|
|
|
|
name => 'max_reports', |
791
|
|
|
|
|
|
|
option => 'max-reports|max=i', |
792
|
|
|
|
|
|
|
default => 10, |
793
|
|
|
|
|
|
|
helptext => "Maximum number of reports to pick from", |
794
|
|
|
|
|
|
|
); |
795
|
|
|
|
|
|
|
} |
796
|
|
|
|
|
|
|
|
797
|
|
|
|
|
|
|
sub mdir { # mdir => fdir => ddir |
798
|
0
|
|
|
0
|
0
|
0
|
return $opt->new( |
799
|
|
|
|
|
|
|
name => 'mdir', |
800
|
|
|
|
|
|
|
option => '=s', |
801
|
|
|
|
|
|
|
helptext => "The master directory of the Hardlink-Forest.", |
802
|
|
|
|
|
|
|
); |
803
|
|
|
|
|
|
|
} |
804
|
|
|
|
|
|
|
|
805
|
|
|
|
|
|
|
sub minus_des { |
806
|
0
|
|
|
0
|
0
|
0
|
return $opt->new( |
807
|
|
|
|
|
|
|
name => 'des', |
808
|
|
|
|
|
|
|
option => 'usedft', |
809
|
|
|
|
|
|
|
helptext => "Use all the default values.", |
810
|
|
|
|
|
|
|
); |
811
|
|
|
|
|
|
|
} |
812
|
|
|
|
|
|
|
|
813
|
|
|
|
|
|
|
sub mspass { |
814
|
8
|
|
|
8
|
0
|
40
|
return $opt->new( |
815
|
|
|
|
|
|
|
name => 'mspass', |
816
|
|
|
|
|
|
|
option => '=s', |
817
|
|
|
|
|
|
|
helptext => 'Password for for SMTP server.', |
818
|
|
|
|
|
|
|
configtext => "Type the password: 'noecho' but plain-text in config file!", |
819
|
|
|
|
|
|
|
configtype => 'prompt_noecho', |
820
|
|
|
|
|
|
|
); |
821
|
|
|
|
|
|
|
} |
822
|
|
|
|
|
|
|
|
823
|
|
|
|
|
|
|
sub msport { |
824
|
12
|
|
|
12
|
0
|
47
|
return $opt->new( |
825
|
|
|
|
|
|
|
name => 'msport', |
826
|
|
|
|
|
|
|
option => '=i', |
827
|
|
|
|
|
|
|
default => 25, |
828
|
|
|
|
|
|
|
helptext => 'Which port for SMTP server to send reports.', |
829
|
|
|
|
|
|
|
configtext => "Some SMTP servers use port 465 or 587", |
830
|
|
|
|
|
|
|
); |
831
|
|
|
|
|
|
|
} |
832
|
|
|
|
|
|
|
|
833
|
|
|
|
|
|
|
sub msuser { |
834
|
8
|
|
|
8
|
0
|
101
|
return $opt->new( |
835
|
|
|
|
|
|
|
name => 'msuser', |
836
|
|
|
|
|
|
|
option => '=s', |
837
|
|
|
|
|
|
|
default => undef, |
838
|
|
|
|
|
|
|
allow => [ undef, '', qr/\w+/ ], |
839
|
|
|
|
|
|
|
helptext => 'Username for SMTP server.', |
840
|
|
|
|
|
|
|
configtext => "This is the username for logging into the SMTP server\n" |
841
|
|
|
|
|
|
|
. " leave empty if you don't have to login", |
842
|
|
|
|
|
|
|
); |
843
|
|
|
|
|
|
|
} |
844
|
|
|
|
|
|
|
|
845
|
|
|
|
|
|
|
sub mserver { |
846
|
12
|
|
|
12
|
0
|
54
|
return $opt->new( |
847
|
|
|
|
|
|
|
name => 'mserver', |
848
|
|
|
|
|
|
|
option => '=s', |
849
|
|
|
|
|
|
|
default => 'localhost', |
850
|
|
|
|
|
|
|
helptext => 'Which SMTP server to send reports.', |
851
|
|
|
|
|
|
|
configtext => "SMTP server to use for sending reports", |
852
|
|
|
|
|
|
|
); |
853
|
|
|
|
|
|
|
} |
854
|
|
|
|
|
|
|
|
855
|
|
|
|
|
|
|
sub opt_continue { |
856
|
7
|
|
|
7
|
0
|
53
|
return $opt->new( |
857
|
|
|
|
|
|
|
name => 'continue', |
858
|
|
|
|
|
|
|
option => '', |
859
|
|
|
|
|
|
|
default => 0, |
860
|
|
|
|
|
|
|
helptext => "Continue where last smoke left-off.", |
861
|
|
|
|
|
|
|
); |
862
|
|
|
|
|
|
|
} |
863
|
|
|
|
|
|
|
|
864
|
|
|
|
|
|
|
sub outfile { |
865
|
20
|
|
|
20
|
0
|
4449
|
return $opt->new( |
866
|
|
|
|
|
|
|
name => 'outfile', |
867
|
|
|
|
|
|
|
option => '=s', |
868
|
|
|
|
|
|
|
default => 'mktest.out', |
869
|
|
|
|
|
|
|
helptext => 'Name of the file to store the raw smoke log in.', |
870
|
|
|
|
|
|
|
); |
871
|
|
|
|
|
|
|
} |
872
|
|
|
|
|
|
|
|
873
|
|
|
|
|
|
|
sub pass_option { |
874
|
|
|
|
|
|
|
return $opt->new( |
875
|
|
|
|
|
|
|
name => 'pass_option', |
876
|
|
|
|
|
|
|
option => 'pass-option|p=s@', |
877
|
|
|
|
|
|
|
default => [], |
878
|
|
|
|
|
|
|
allow => sub { |
879
|
7
|
|
|
7
|
|
26
|
my ($list) = @_; |
880
|
7
|
50
|
|
|
|
36
|
return unless ref($list) eq 'ARRAY'; |
881
|
7
|
|
|
|
|
24
|
for my $to_pass (@$list) { |
882
|
2
|
50
|
|
|
|
16
|
return unless $to_pass =~ m{^ - [DUA] .+ $}x; |
883
|
|
|
|
|
|
|
} |
884
|
7
|
|
|
|
|
35
|
return 1; |
885
|
|
|
|
|
|
|
}, |
886
|
7
|
|
|
7
|
0
|
73
|
helptext => 'Pass these options to Configure.', |
887
|
|
|
|
|
|
|
); |
888
|
|
|
|
|
|
|
} |
889
|
|
|
|
|
|
|
|
890
|
|
|
|
|
|
|
sub patchlevel { |
891
|
4
|
|
|
4
|
0
|
21
|
return $opt->new( |
892
|
|
|
|
|
|
|
name => 'patchlevel', |
893
|
|
|
|
|
|
|
option => '=s', |
894
|
|
|
|
|
|
|
helptext => "State the 'patchlevel' of the source-tree (for --nosync).", |
895
|
|
|
|
|
|
|
); |
896
|
|
|
|
|
|
|
} |
897
|
|
|
|
|
|
|
|
898
|
|
|
|
|
|
|
sub perl_version { |
899
|
0
|
|
|
0
|
0
|
0
|
return $opt->new( |
900
|
|
|
|
|
|
|
name => 'perl_version', |
901
|
|
|
|
|
|
|
option => '=s', |
902
|
|
|
|
|
|
|
allow => qr{^ (?:blead | 5 [.] (?: [2][68] | [3-9][02468] ) [.] x+ ) $}x, |
903
|
|
|
|
|
|
|
dft => 'blead', |
904
|
|
|
|
|
|
|
); |
905
|
|
|
|
|
|
|
} |
906
|
|
|
|
|
|
|
|
907
|
|
|
|
|
|
|
sub perl5lib { |
908
|
|
|
|
|
|
|
return $opt->new( |
909
|
|
|
|
|
|
|
name => 'perl5lib', |
910
|
|
|
|
|
|
|
option => '=s', |
911
|
0
|
0
|
|
0
|
0
|
0
|
dft => exists($ENV{PERL5LIB}) ? $ENV{PERL5LIB} : '', |
912
|
|
|
|
|
|
|
helptext => "What value should be used for PERL5LIB in the jcl wrapper?\n", |
913
|
|
|
|
|
|
|
configtext => "\$PERL5LIB will be set to this value during the smoke\n" |
914
|
|
|
|
|
|
|
. "\t(Make empty, with single space, to not set it.)", |
915
|
|
|
|
|
|
|
); |
916
|
|
|
|
|
|
|
} |
917
|
|
|
|
|
|
|
|
918
|
|
|
|
|
|
|
sub perl5opt { |
919
|
|
|
|
|
|
|
return $opt->new( |
920
|
|
|
|
|
|
|
name => 'perl5opt', |
921
|
|
|
|
|
|
|
option => '=s', |
922
|
0
|
0
|
|
0
|
0
|
0
|
dft => exists($ENV{PERL5OPT}) ? $ENV{PERL5OPT} : '', |
923
|
|
|
|
|
|
|
helptext => "What value should be used for PERL5OPT in the jcl wrapper?\n", |
924
|
|
|
|
|
|
|
configtext => "\$PERL5OPT will be set to this value during the smoke\n" |
925
|
|
|
|
|
|
|
. "\t(Make empty, with single space, to not set it.)", |
926
|
|
|
|
|
|
|
); |
927
|
|
|
|
|
|
|
} |
928
|
|
|
|
|
|
|
|
929
|
|
|
|
|
|
|
sub poster { |
930
|
|
|
|
|
|
|
return $opt->new( |
931
|
|
|
|
|
|
|
name => 'poster', |
932
|
|
|
|
|
|
|
option => '=s', |
933
|
|
|
|
|
|
|
allow => [qw/HTTP::Tiny LWP::UserAgent curl/], |
934
|
|
|
|
|
|
|
default => 'HTTP::Tiny', |
935
|
|
|
|
|
|
|
helptext => "The type of HTTP post system to use.", |
936
|
|
|
|
|
|
|
configtext => "Which HTTP client do you want to use?", |
937
|
|
|
|
|
|
|
configalt => _helper('get_avail_posters'), |
938
|
0
|
|
|
0
|
|
0
|
configdft => sub { (_helper('get_avail_posters')->())[0] }, |
939
|
14
|
|
|
14
|
0
|
102
|
configord => 2, |
940
|
|
|
|
|
|
|
); |
941
|
|
|
|
|
|
|
} |
942
|
|
|
|
|
|
|
|
943
|
|
|
|
|
|
|
sub report { |
944
|
19
|
100
|
|
19
|
0
|
73
|
my $default = @_ ? shift : 1; |
945
|
19
|
|
|
|
|
59
|
return $opt->new( |
946
|
|
|
|
|
|
|
name => 'report', |
947
|
|
|
|
|
|
|
option => '!', |
948
|
|
|
|
|
|
|
default => $default, |
949
|
|
|
|
|
|
|
helptext => "Create the report/json files.", |
950
|
|
|
|
|
|
|
); |
951
|
|
|
|
|
|
|
} |
952
|
|
|
|
|
|
|
|
953
|
|
|
|
|
|
|
sub rptfile { |
954
|
21
|
|
|
21
|
0
|
87
|
return $opt->new( |
955
|
|
|
|
|
|
|
name => 'rptfile', |
956
|
|
|
|
|
|
|
option => '=s', |
957
|
|
|
|
|
|
|
default => 'mktest.rpt', |
958
|
|
|
|
|
|
|
helptext => 'Name of the file to store the email report in.', |
959
|
|
|
|
|
|
|
); |
960
|
|
|
|
|
|
|
} |
961
|
|
|
|
|
|
|
|
962
|
|
|
|
|
|
|
sub rsyncbin { |
963
|
|
|
|
|
|
|
return $opt->new( |
964
|
|
|
|
|
|
|
name => 'rsync', #old name |
965
|
|
|
|
|
|
|
option => '=s', |
966
|
|
|
|
|
|
|
default => 'rsync', # you might want a path there |
967
|
|
|
|
|
|
|
helptext => "The name of the 'rsync' programe.", |
968
|
|
|
|
|
|
|
configtext => "Which 'rsync' binary do you want to use?", |
969
|
|
|
|
|
|
|
configtype => 'prompt_file', |
970
|
0
|
|
|
0
|
|
0
|
configdft => sub { (_helper(whereis => ['rsync'])->())->[0] }, |
971
|
5
|
|
|
5
|
0
|
70
|
configord => 1, |
972
|
|
|
|
|
|
|
); |
973
|
|
|
|
|
|
|
} |
974
|
|
|
|
|
|
|
|
975
|
|
|
|
|
|
|
sub rsyncsource { |
976
|
5
|
|
|
5
|
0
|
36
|
return $opt->new( |
977
|
|
|
|
|
|
|
name => 'source', |
978
|
|
|
|
|
|
|
option => '=s', |
979
|
|
|
|
|
|
|
default => 'dromedary.p5h.org:5872::perl-current', |
980
|
|
|
|
|
|
|
helptext => "The remote location of the rsync archive.", |
981
|
|
|
|
|
|
|
configtext => "Where would you like to rsync from?", |
982
|
|
|
|
|
|
|
configtype => 'prompt', |
983
|
|
|
|
|
|
|
configord => 2, |
984
|
|
|
|
|
|
|
); |
985
|
|
|
|
|
|
|
} |
986
|
|
|
|
|
|
|
|
987
|
|
|
|
|
|
|
sub rsyncopts { |
988
|
5
|
|
|
5
|
0
|
38
|
return $opt->new( |
989
|
|
|
|
|
|
|
name => 'opts', |
990
|
|
|
|
|
|
|
option => '=s', |
991
|
|
|
|
|
|
|
default => '-az --delete', |
992
|
|
|
|
|
|
|
helptext => "Options to use for the 'rsync' program", |
993
|
|
|
|
|
|
|
configtext => "Which arguments should be used for rsync?", |
994
|
|
|
|
|
|
|
configtype => 'prompt', |
995
|
|
|
|
|
|
|
configord => 3, |
996
|
|
|
|
|
|
|
); |
997
|
|
|
|
|
|
|
} |
998
|
|
|
|
|
|
|
|
999
|
|
|
|
|
|
|
sub send_log { |
1000
|
6
|
|
|
6
|
0
|
84
|
my $allow = [qw/ never on_fail always /]; |
1001
|
|
|
|
|
|
|
return $opt->new( |
1002
|
|
|
|
|
|
|
name => 'send_log', |
1003
|
|
|
|
|
|
|
option => '=s', |
1004
|
|
|
|
|
|
|
default => 'on_fail', |
1005
|
|
|
|
|
|
|
allow => $allow, |
1006
|
|
|
|
|
|
|
helptext => "Send logfile to the CoreSmokeDB server.", |
1007
|
|
|
|
|
|
|
configtext => "Do you want to send the logfile with the report?", |
1008
|
0
|
|
|
0
|
|
0
|
configalt => sub {$allow}, |
1009
|
0
|
|
|
0
|
|
0
|
configdft => sub {'on_fail'}, |
1010
|
6
|
|
|
|
|
237
|
configord => 4, |
1011
|
|
|
|
|
|
|
); |
1012
|
|
|
|
|
|
|
} |
1013
|
|
|
|
|
|
|
|
1014
|
|
|
|
|
|
|
sub send_out { |
1015
|
6
|
|
|
6
|
0
|
88
|
my $allow = [qw/ never on_fail always /]; |
1016
|
|
|
|
|
|
|
return $opt->new( |
1017
|
|
|
|
|
|
|
name => 'send_out', |
1018
|
|
|
|
|
|
|
option => '=s', |
1019
|
|
|
|
|
|
|
default => 'never', |
1020
|
|
|
|
|
|
|
allow => $allow, |
1021
|
|
|
|
|
|
|
helptext => "Send out-file to the CoreSmokeDB server.", |
1022
|
|
|
|
|
|
|
configtext => "Do you want to send the outfile with the report?", |
1023
|
0
|
|
|
0
|
|
0
|
configalt => sub {$allow}, |
1024
|
0
|
|
|
0
|
|
0
|
configdft => sub {'never'}, |
1025
|
6
|
|
|
|
|
128
|
configord => 5, |
1026
|
|
|
|
|
|
|
); |
1027
|
|
|
|
|
|
|
} |
1028
|
|
|
|
|
|
|
|
1029
|
|
|
|
|
|
|
sub sendemailbin { |
1030
|
|
|
|
|
|
|
return $opt->new( |
1031
|
|
|
|
|
|
|
name => 'sendemailbin', |
1032
|
|
|
|
|
|
|
option => '=s', |
1033
|
|
|
|
|
|
|
default => 'sendemail', |
1034
|
|
|
|
|
|
|
helptext => "The name of the 'sendemail' program.", |
1035
|
|
|
|
|
|
|
configtext => 'The fully qualified name of the executable.', |
1036
|
0
|
|
|
0
|
|
0
|
configdft => sub { (_helper(whereis => ['sendemail'])->())->[0] }, |
1037
|
4
|
|
|
4
|
0
|
46
|
); |
1038
|
|
|
|
|
|
|
} |
1039
|
|
|
|
|
|
|
|
1040
|
|
|
|
|
|
|
sub sendmailbin { |
1041
|
|
|
|
|
|
|
return $opt->new( |
1042
|
|
|
|
|
|
|
name => 'sendmailbin', |
1043
|
|
|
|
|
|
|
option => '=s', |
1044
|
|
|
|
|
|
|
default => 'sendmail', |
1045
|
|
|
|
|
|
|
helptext => "The name of the 'sendmail' program.", |
1046
|
|
|
|
|
|
|
configtext => 'The fully qualified name of the executable.', |
1047
|
0
|
|
|
0
|
|
0
|
configdft => sub { (_helper(whereis => ['sendmail'])->())->[0] }, |
1048
|
4
|
|
|
4
|
0
|
33
|
); |
1049
|
|
|
|
|
|
|
} |
1050
|
|
|
|
|
|
|
|
1051
|
|
|
|
|
|
|
sub sendreport { |
1052
|
4
|
|
|
4
|
0
|
21
|
return $opt->new( |
1053
|
|
|
|
|
|
|
name => 'sendreport', |
1054
|
|
|
|
|
|
|
option => '!', |
1055
|
|
|
|
|
|
|
default => 1, |
1056
|
|
|
|
|
|
|
helptext => "Send the report mail/CoreSmokeDB.", |
1057
|
|
|
|
|
|
|
); |
1058
|
|
|
|
|
|
|
} |
1059
|
|
|
|
|
|
|
|
1060
|
|
|
|
|
|
|
sub showcfg { |
1061
|
6
|
|
|
6
|
0
|
34
|
return $opt->new( |
1062
|
|
|
|
|
|
|
name => 'showcfg', |
1063
|
|
|
|
|
|
|
option => '!', |
1064
|
|
|
|
|
|
|
default => 0, |
1065
|
|
|
|
|
|
|
helptext => "Show a complete overview of all build configurations.", |
1066
|
|
|
|
|
|
|
); |
1067
|
|
|
|
|
|
|
} |
1068
|
|
|
|
|
|
|
|
1069
|
|
|
|
|
|
|
sub skip_tests { |
1070
|
|
|
|
|
|
|
return $opt->new( |
1071
|
|
|
|
|
|
|
name => 'skip_tests', |
1072
|
|
|
|
|
|
|
option => '=s', |
1073
|
|
|
|
|
|
|
helptext => "Name of the file to store tests to skip.", |
1074
|
|
|
|
|
|
|
configtext => "What file do you want to use to specify tests to skip. |
1075
|
|
|
|
|
|
|
\t(Make empty for none)", |
1076
|
|
|
|
|
|
|
configtype => 'prompt_file', |
1077
|
|
|
|
|
|
|
configfnex => 1, |
1078
|
|
|
|
|
|
|
configdft => sub { |
1079
|
0
|
|
|
0
|
|
0
|
my $app = shift; |
1080
|
0
|
|
|
|
|
0
|
$app->prefix . ".skiptests"; |
1081
|
|
|
|
|
|
|
}, |
1082
|
13
|
|
|
13
|
0
|
96
|
); |
1083
|
|
|
|
|
|
|
} |
1084
|
|
|
|
|
|
|
|
1085
|
|
|
|
|
|
|
sub smartsmoke { |
1086
|
|
|
|
|
|
|
return $opt->new( |
1087
|
|
|
|
|
|
|
name => 'smartsmoke', |
1088
|
|
|
|
|
|
|
option => '!', |
1089
|
|
|
|
|
|
|
allow => [ 0, 1 ], |
1090
|
|
|
|
|
|
|
default => 1, |
1091
|
|
|
|
|
|
|
helptext => "Do not smoke when the source-tree did not change.", |
1092
|
|
|
|
|
|
|
configtext => "Skip smoke unless patchlevel changed?", |
1093
|
|
|
|
|
|
|
configtype => 'prompt_yn', |
1094
|
0
|
|
|
0
|
|
0
|
configalt => sub { [qw/ Y n/] }, |
1095
|
0
|
|
|
0
|
|
0
|
configdft => sub {'y'}, |
1096
|
4
|
|
|
4
|
0
|
57
|
); |
1097
|
|
|
|
|
|
|
} |
1098
|
|
|
|
|
|
|
|
1099
|
|
|
|
|
|
|
sub smokedb_url { |
1100
|
10
|
|
|
10
|
0
|
35
|
my $default = 'https://perl5.test-smoke.org/report'; |
1101
|
|
|
|
|
|
|
return $opt->new( |
1102
|
|
|
|
|
|
|
name => 'smokedb_url', |
1103
|
|
|
|
|
|
|
option => '=s', |
1104
|
|
|
|
|
|
|
default => $default, |
1105
|
|
|
|
|
|
|
helptext => "The URL for sending reports to CoreSmokeDB.", |
1106
|
|
|
|
|
|
|
configtext => "Where do I send the reports?", |
1107
|
0
|
|
|
0
|
|
0
|
configdft => sub { $default }, |
1108
|
10
|
|
|
|
|
73
|
configord => 1, |
1109
|
|
|
|
|
|
|
); |
1110
|
|
|
|
|
|
|
} |
1111
|
|
|
|
|
|
|
|
1112
|
|
|
|
|
|
|
sub sync { |
1113
|
4
|
|
|
4
|
0
|
20
|
return $opt->new( |
1114
|
|
|
|
|
|
|
name => 'sync', |
1115
|
|
|
|
|
|
|
option => 'fetch!', |
1116
|
|
|
|
|
|
|
default => 1, |
1117
|
|
|
|
|
|
|
helptext => "Synchronize the source-tree before smoking.", |
1118
|
|
|
|
|
|
|
); |
1119
|
|
|
|
|
|
|
} |
1120
|
|
|
|
|
|
|
|
1121
|
|
|
|
|
|
|
sub sync_type { |
1122
|
5
|
|
|
5
|
0
|
58
|
return $opt->new( |
1123
|
|
|
|
|
|
|
name => 'sync_type', |
1124
|
|
|
|
|
|
|
option => '=s', |
1125
|
|
|
|
|
|
|
allow => [qw/git rsync copy/], |
1126
|
|
|
|
|
|
|
default => 'git', |
1127
|
|
|
|
|
|
|
helptext => 'The source tree sync method.', |
1128
|
|
|
|
|
|
|
configtext => 'How would you like to sync the perl-source?', |
1129
|
|
|
|
|
|
|
configtype => 'prompt', |
1130
|
|
|
|
|
|
|
configalt => _helper( get_avail_sync => [ ]), |
1131
|
|
|
|
|
|
|
); |
1132
|
|
|
|
|
|
|
} |
1133
|
|
|
|
|
|
|
|
1134
|
|
|
|
|
|
|
sub swbcc { |
1135
|
4
|
|
|
4
|
0
|
38
|
return $opt->new( |
1136
|
|
|
|
|
|
|
name => 'swbcc', |
1137
|
|
|
|
|
|
|
option => '=s', |
1138
|
|
|
|
|
|
|
default => '-b', |
1139
|
|
|
|
|
|
|
helptext => 'The syntax of the commandline switch for BCC.', |
1140
|
|
|
|
|
|
|
); |
1141
|
|
|
|
|
|
|
} |
1142
|
|
|
|
|
|
|
|
1143
|
|
|
|
|
|
|
sub swcc { |
1144
|
4
|
|
|
4
|
0
|
21
|
return $opt->new( |
1145
|
|
|
|
|
|
|
name => 'swcc', |
1146
|
|
|
|
|
|
|
option => '=s', |
1147
|
|
|
|
|
|
|
default => '-c', |
1148
|
|
|
|
|
|
|
helptext => 'The syntax of the commandline switch for CC.', |
1149
|
|
|
|
|
|
|
); |
1150
|
|
|
|
|
|
|
} |
1151
|
|
|
|
|
|
|
|
1152
|
|
|
|
|
|
|
sub testmake { # This was an Alan Burlison request. |
1153
|
7
|
|
|
7
|
0
|
61
|
require Config; |
1154
|
|
|
|
|
|
|
return $opt->new( |
1155
|
|
|
|
|
|
|
name => 'testmake', |
1156
|
|
|
|
|
|
|
option => '=s', |
1157
|
|
|
|
|
|
|
default => undef, |
1158
|
|
|
|
|
|
|
helptext => "A different make program for 'make _test'.", |
1159
|
|
|
|
|
|
|
configtext => "Specify a different make binary for 'make _test'?", |
1160
|
|
|
|
|
|
|
configdft => sub { |
1161
|
0
|
0
|
|
0
|
|
0
|
$Config::Config{make} ? $Config::Config{make} : 'make' |
1162
|
|
|
|
|
|
|
}, |
1163
|
7
|
|
|
|
|
53
|
); |
1164
|
|
|
|
|
|
|
} |
1165
|
|
|
|
|
|
|
|
1166
|
|
|
|
|
|
|
sub to { |
1167
|
4
|
|
|
4
|
0
|
15
|
my $mailing_list = 'daily-build-reports@perl.org'; |
1168
|
|
|
|
|
|
|
return $opt->new( |
1169
|
|
|
|
|
|
|
name => 'to', |
1170
|
|
|
|
|
|
|
option => '=s', |
1171
|
|
|
|
|
|
|
default => $mailing_list, |
1172
|
|
|
|
|
|
|
allow => [qr/@/], |
1173
|
|
|
|
|
|
|
helptext => 'Where to send the reports to.', |
1174
|
|
|
|
|
|
|
configtype => 'prompt', |
1175
|
|
|
|
|
|
|
configtext => 'This is the email address used to send TO:', |
1176
|
0
|
|
|
0
|
|
0
|
configdft => sub {$mailing_list}, |
1177
|
4
|
|
|
|
|
64
|
); |
1178
|
|
|
|
|
|
|
} |
1179
|
|
|
|
|
|
|
|
1180
|
|
|
|
|
|
|
sub ua_timeout { |
1181
|
|
|
|
|
|
|
return $opt->new( |
1182
|
|
|
|
|
|
|
name => 'ua_timeout', |
1183
|
|
|
|
|
|
|
option => '=i', |
1184
|
|
|
|
|
|
|
default => 30, |
1185
|
|
|
|
|
|
|
allow => qr/^[1-9][0-9]{0,5}$/, |
1186
|
|
|
|
|
|
|
helptext => "The timeout to set the LWP::UserAgent.", |
1187
|
|
|
|
|
|
|
configtext => "What should the timeout for the useragent be?", |
1188
|
0
|
|
|
0
|
|
0
|
configdft => sub {30}, |
1189
|
21
|
|
|
21
|
0
|
160
|
configord => 3, |
1190
|
|
|
|
|
|
|
); |
1191
|
|
|
|
|
|
|
} |
1192
|
|
|
|
|
|
|
|
1193
|
|
|
|
|
|
|
sub un_file { |
1194
|
|
|
|
|
|
|
return $opt->new( |
1195
|
|
|
|
|
|
|
name => 'un_file', |
1196
|
|
|
|
|
|
|
option => '=s', |
1197
|
|
|
|
|
|
|
helptext => "Name of the file with the 'user_note' text.", |
1198
|
|
|
|
|
|
|
configtext => "In which file will you store your personal notes? |
1199
|
|
|
|
|
|
|
\t(Leave empty for none.)", |
1200
|
|
|
|
|
|
|
configtype => 'prompt_file', |
1201
|
|
|
|
|
|
|
configfnex => 1, |
1202
|
|
|
|
|
|
|
configdft => sub { |
1203
|
0
|
|
|
0
|
|
0
|
my $app = shift; |
1204
|
0
|
|
|
|
|
0
|
return $app->prefix . '.usernote'; |
1205
|
|
|
|
|
|
|
}, |
1206
|
6
|
|
|
6
|
0
|
141
|
); |
1207
|
|
|
|
|
|
|
} |
1208
|
|
|
|
|
|
|
|
1209
|
|
|
|
|
|
|
sub un_position { |
1210
|
|
|
|
|
|
|
return $opt->new( |
1211
|
|
|
|
|
|
|
name => 'un_position', |
1212
|
|
|
|
|
|
|
option => '=s', |
1213
|
|
|
|
|
|
|
allow => ['top', 'bottom'], |
1214
|
|
|
|
|
|
|
default => 'bottom', |
1215
|
|
|
|
|
|
|
helptext => "Position of the 'user_note' in the smoke report.", |
1216
|
|
|
|
|
|
|
configtext => "Where do you want your personal notes in the report?", |
1217
|
0
|
|
|
0
|
|
0
|
configalt => sub { [qw/top bottom/] }, |
1218
|
0
|
|
|
0
|
|
0
|
configdft => sub {'bottom'}, |
1219
|
6
|
|
|
6
|
0
|
148
|
); |
1220
|
|
|
|
|
|
|
} |
1221
|
|
|
|
|
|
|
|
1222
|
|
|
|
|
|
|
sub user_note { |
1223
|
6
|
|
|
6
|
0
|
112
|
return $opt->new( |
1224
|
|
|
|
|
|
|
name => 'user_note', |
1225
|
|
|
|
|
|
|
option => '=s', |
1226
|
|
|
|
|
|
|
helptext => "Extra text to insert into the smoke report.", |
1227
|
|
|
|
|
|
|
); |
1228
|
|
|
|
|
|
|
} |
1229
|
|
|
|
|
|
|
|
1230
|
|
|
|
|
|
|
sub v { |
1231
|
|
|
|
|
|
|
return $opt->new( |
1232
|
|
|
|
|
|
|
name => 'v', |
1233
|
|
|
|
|
|
|
option => ':1', |
1234
|
|
|
|
|
|
|
default => 1, |
1235
|
|
|
|
|
|
|
allow => [0, 1, 2], |
1236
|
|
|
|
|
|
|
helptext => "Log-level during smoke", |
1237
|
|
|
|
|
|
|
configtext => "How verbose do you want the output?", |
1238
|
0
|
|
|
0
|
|
0
|
configalt => sub { [0, 1, 2] }, |
1239
|
0
|
|
|
0
|
0
|
0
|
); |
1240
|
|
|
|
|
|
|
} |
1241
|
|
|
|
|
|
|
|
1242
|
|
|
|
|
|
|
sub vmsmake { |
1243
|
0
|
|
|
0
|
0
|
0
|
return $opt->new( |
1244
|
|
|
|
|
|
|
name => 'vmsmake', |
1245
|
|
|
|
|
|
|
option => '=s', |
1246
|
|
|
|
|
|
|
default => 'MMK', |
1247
|
|
|
|
|
|
|
helptext => "The make program on VMS.", |
1248
|
|
|
|
|
|
|
) |
1249
|
|
|
|
|
|
|
} |
1250
|
|
|
|
|
|
|
|
1251
|
|
|
|
|
|
|
sub w32args { |
1252
|
7
|
|
|
7
|
0
|
32
|
return $opt->new( |
1253
|
|
|
|
|
|
|
name => 'w32args', |
1254
|
|
|
|
|
|
|
option => '=s@', |
1255
|
|
|
|
|
|
|
default => [], |
1256
|
|
|
|
|
|
|
helptext => "Extra options to pass to W32Configure.", |
1257
|
|
|
|
|
|
|
) |
1258
|
|
|
|
|
|
|
} |
1259
|
|
|
|
|
|
|
|
1260
|
|
|
|
|
|
|
sub w32cc { |
1261
|
7
|
|
|
7
|
0
|
31
|
return $opt->new( |
1262
|
|
|
|
|
|
|
name => 'w32cc', |
1263
|
|
|
|
|
|
|
option => '=s', |
1264
|
|
|
|
|
|
|
helptext => "The compiler on MSWin32.", |
1265
|
|
|
|
|
|
|
); |
1266
|
|
|
|
|
|
|
} |
1267
|
|
|
|
|
|
|
|
1268
|
|
|
|
|
|
|
sub w32make { |
1269
|
7
|
|
|
7
|
0
|
27
|
return $opt->new( |
1270
|
|
|
|
|
|
|
name => 'w32make', |
1271
|
|
|
|
|
|
|
option => '=s', |
1272
|
|
|
|
|
|
|
default => 'gmake', |
1273
|
|
|
|
|
|
|
helptext => "The make program on MSWin32.", |
1274
|
|
|
|
|
|
|
); |
1275
|
|
|
|
|
|
|
} |
1276
|
|
|
|
|
|
|
|
1277
|
|
|
|
|
|
|
sub _helper { |
1278
|
27
|
|
|
27
|
|
92
|
my ($helper, $args) = @_; |
1279
|
|
|
|
|
|
|
|
1280
|
|
|
|
|
|
|
return sub { |
1281
|
0
|
|
|
0
|
|
|
require Test::Smoke::Util::FindHelpers; |
1282
|
0
|
|
|
|
|
|
my $run_helper = Test::Smoke::Util::FindHelpers->can($helper); |
1283
|
0
|
|
|
|
|
|
my @values; |
1284
|
0
|
0
|
|
|
|
|
if ($helper =~ m{(?:mailers)}) { |
1285
|
0
|
|
|
|
|
|
my %helpers = $run_helper->(@$args); |
1286
|
0
|
|
|
|
|
|
@values = sort keys %helpers; |
1287
|
|
|
|
|
|
|
} |
1288
|
|
|
|
|
|
|
else { |
1289
|
0
|
|
|
|
|
|
@values = $run_helper->( @$args ); |
1290
|
|
|
|
|
|
|
} |
1291
|
|
|
|
|
|
|
|
1292
|
0
|
|
|
|
|
|
return [ @values ]; |
1293
|
|
|
|
|
|
|
} |
1294
|
27
|
|
|
|
|
361
|
} |
1295
|
|
|
|
|
|
|
|
1296
|
|
|
|
|
|
|
1; |
1297
|
|
|
|
|
|
|
|
1298
|
|
|
|
|
|
|
=head1 COPYRIGHT |
1299
|
|
|
|
|
|
|
|
1300
|
|
|
|
|
|
|
(c) 2002-2013, Abe Timmerman All rights reserved. |
1301
|
|
|
|
|
|
|
|
1302
|
|
|
|
|
|
|
With contributions from Jarkko Hietaniemi, Merijn Brand, Campo |
1303
|
|
|
|
|
|
|
Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop, |
1304
|
|
|
|
|
|
|
Rich Rauenzahn, David Cantrell. |
1305
|
|
|
|
|
|
|
|
1306
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
1307
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
1308
|
|
|
|
|
|
|
|
1309
|
|
|
|
|
|
|
See: |
1310
|
|
|
|
|
|
|
|
1311
|
|
|
|
|
|
|
=over 4 |
1312
|
|
|
|
|
|
|
|
1313
|
|
|
|
|
|
|
=item * L |
1314
|
|
|
|
|
|
|
|
1315
|
|
|
|
|
|
|
=item * L |
1316
|
|
|
|
|
|
|
|
1317
|
|
|
|
|
|
|
=back |
1318
|
|
|
|
|
|
|
|
1319
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, |
1320
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1321
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
1322
|
|
|
|
|
|
|
|
1323
|
|
|
|
|
|
|
=cut |