| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
14193
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
26
|
|
|
2
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
198
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::BrewBuild::Plugin::Author; |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# default exec command set plugin for Test::BrewBuild with author testing |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$ENV{RELEASE_TESTING} = 1; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $state = bless {}, __PACKAGE__; |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub brewbuild_exec{ |
|
15
|
0
|
|
|
0
|
1
|
|
shift; # throw away class |
|
16
|
0
|
|
|
|
|
|
my $log = shift; |
|
17
|
|
|
|
|
|
|
|
|
18
|
0
|
0
|
|
|
|
|
if ($log){ |
|
19
|
0
|
|
|
|
|
|
my $package_log = $log->child('Test::BrewBuild::Plugin::Author'); |
|
20
|
0
|
|
|
|
|
|
$package_log->_7("initializing plugin"); |
|
21
|
|
|
|
|
|
|
|
|
22
|
0
|
0
|
|
|
|
|
if (! $ENV{RELEASE_TESTING}){ |
|
23
|
0
|
|
|
|
|
|
$package_log->_0( |
|
24
|
|
|
|
|
|
|
"RELEASE_TESTING env var not set... We'll install ". |
|
25
|
|
|
|
|
|
|
"author packages, but won't run them" |
|
26
|
|
|
|
|
|
|
); |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
my $clog = $log->child( __PACKAGE__.'::brewbuild_exec' ); |
|
31
|
0
|
|
|
|
|
|
$clog->_6( 'performing plugin duties' ); |
|
32
|
0
|
|
|
|
|
|
return _cmd(); |
|
33
|
|
|
|
|
|
|
} |
|
34
|
|
|
|
|
|
|
sub _cmd { |
|
35
|
0
|
|
|
0
|
|
|
my $module = shift; |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
#FIXME: we have to do the below nonsense, because DATA can't |
|
38
|
|
|
|
|
|
|
# be opened twice if we get called more than once per run |
|
39
|
|
|
|
|
|
|
|
|
40
|
0
|
0
|
|
|
|
|
if (! defined $state->{raw}){ |
|
41
|
0
|
|
|
|
|
|
@{ $state->{raw} } = ; |
|
|
0
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
my @cmd = @{ $state->{raw} }; |
|
|
0
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
return @cmd; |
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
1; |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=pod |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 NAME |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Test::BrewBuild::Plugin::Author - Default test run, but installs author test |
|
55
|
|
|
|
|
|
|
distributions |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# install various POD and MANIFEST testing distributions, then |
|
60
|
|
|
|
|
|
|
# run the default tests |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
brewbuild --plugin Test::BrewBuild::Plugin::Author |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This distribution/module is exactly the same as the default test execution |
|
67
|
|
|
|
|
|
|
plugin that is distributed with L, which is |
|
68
|
|
|
|
|
|
|
L. The only difference is this one will |
|
69
|
|
|
|
|
|
|
install author-related distributions that will perform the tests typically run |
|
70
|
|
|
|
|
|
|
when under the environment variable C. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
These installed distributions are: |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Pod::Coverage |
|
75
|
|
|
|
|
|
|
Test::Pod::Coverage |
|
76
|
|
|
|
|
|
|
Test::Manifest |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
We also attempt to set C<$ENV{RELEASE} =1>. If we can't, and a log object is |
|
79
|
|
|
|
|
|
|
sent in, we'll log that the environment variable isn't set so author testing |
|
80
|
|
|
|
|
|
|
can't be performed. |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 METHODS |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 brewbuild_exec($log) |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Is called by C, executes the test commands provided |
|
87
|
|
|
|
|
|
|
by this plugin's C section. |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
Optionally takes a C object as a parameter. |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head1 AUTHOR |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Steve Bertrand, C<< >> |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=cut |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
__DATA__ |