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