Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 479 lines (377 sloc) 14.765 kB
f283eba @pjcj import Devel::Cover 0.32
pjcj authored
1 #!/usr/bin/perl
692f58f @pjcj import Devel::Cover 0.01
pjcj authored
2
c7f77d4 @pjcj I think my canonical mail address is here to stay.
pjcj authored
3 # Copyright 2001-2012, Paul Johnson (paul@pjcj.net)
692f58f @pjcj import Devel::Cover 0.01
pjcj authored
4
5 # This software is free. It is licensed under the same terms as Perl itself.
6
7 # The latest version of this software should be available from my homepage:
8 # http://www.pjcj.net
9
754e155 @pjcj The CPAN testers reports for 5.005 are getting annoying. Hopefully t…
pjcj authored
10 require 5.006001;
692f58f @pjcj import Devel::Cover 0.01
pjcj authored
11
12 use strict;
13 use warnings;
14
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
15 use Cwd;
692f58f @pjcj import Devel::Cover 0.01
pjcj authored
16 use ExtUtils::MakeMaker;
9f93b0b @pjcj import Devel::Cover 0.35
pjcj authored
17 use File::Copy;
692f58f @pjcj import Devel::Cover 0.01
pjcj authored
18
19 $| = 1;
20
9caf93c @pjcj Bump version number.
pjcj authored
21 my $Version = "0.87";
c7f77d4 @pjcj I think my canonical mail address is here to stay.
pjcj authored
22 my $Author = 'paul@pjcj.net';
56b80fd @pjcj Tidy up long lines.
pjcj authored
23 my @perlbug = ("perlbug", "-a", $Author,
24 "-s", "Installation of Devel::Cover $Version");
25 my $Perlbug = join " ", map { / / ? "'$_'" : $_ } @perlbug;
26 my $base = getcwd;
27 my %inc = map { -d $_ ? (($_ eq "." ? $_ : Cwd::abs_path($_)) => 1) : () }
28 @INC;
29 my @inc = sort keys %inc;
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
30
31 open I, ">lib/Devel/Cover/Inc.pm"
32 or die "Cannot open lib/Devel/Cover/Inc.pm: $!";
69a8165 @pjcj import Devel::Cover 0.10
pjcj authored
33 print I <<"EOI";
c7f77d4 @pjcj I think my canonical mail address is here to stay.
pjcj authored
34 # Copyright 2001-2012, Paul Johnson (paul\@pjcj.net)
2717da1 @pjcj import Devel::Cover 0.08
pjcj authored
35
36 # This software is free. It is licensed under the same terms as Perl itself.
37
38 # The latest version of this software should be available from my homepage:
39 # http://www.pjcj.net
40
41 # This file was automatically generated by Makefile.PL.
42
43 package Devel::Cover::Inc;
44
45 use strict;
46 use warnings;
47
6a889d3 @pjcj import Devel::Cover 0.48
pjcj authored
48 our \$VERSION = "$Version";
49 our \$Perl_version = '$]';
50 our \$Base = '$base';
51 our \@Inc = qw( @inc );
b89471b @pjcj Be careful with UNC paths on Windows (John LoVerso) (rt 24105).
pjcj authored
52 chomp (our \$Perl = <<'EOV'); # Careful with \\\\ in the path
53 $^X
54 EOV
6a889d3 @pjcj import Devel::Cover 0.48
pjcj authored
55
56 if (\$Perl_version ne \$])
57 {
58 print STDERR <<"EOM";
59
60 This version of Devel::Cover was built with Perl version \$Perl_version.
61 It is now being run with Perl version \$].
62 Attempting to make adjustments, but you may find that some of your modules do
63 not have coverage data collected. You may need to alter the +-inc, +-ignore
64 and +-select options.
65
66 EOM
67 eval "use Cwd";
68 my \%inc = map { -d \$_ ? ((\$_ eq "." ? \$_ : Cwd::abs_path(\$_)) => 1) : () }
69 \@INC;
3cd6743 @pjcj Right justify numerical tabular html output (Sébastien Aperghis-Tramo…
pjcj authored
70 \@Inc = sort keys \%inc;
6a889d3 @pjcj import Devel::Cover 0.48
pjcj authored
71 }
72
73 # TODO - check for threadedness, 64bits etc. ?
2717da1 @pjcj import Devel::Cover 0.08
pjcj authored
74
75 1
69a8165 @pjcj import Devel::Cover 0.10
pjcj authored
76 EOI
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
77 close I or die "Cannot close lib/Devel/Cover/Inc.pm: $!";
2717da1 @pjcj import Devel::Cover 0.08
pjcj authored
78
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
79 print "Writing tests ........ ";
692f58f @pjcj import Devel::Cover 0.01
pjcj authored
80
8b7484f @pjcj Put end to end tests in t/e2e.
pjcj authored
81 for my $d (qw( t t/e2e ))
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
82 {
2fc3325 @pjcj Remove race conditions around mkdir.
pjcj authored
83 unless (mkdir $d)
8b7484f @pjcj Put end to end tests in t/e2e.
pjcj authored
84 {
2fc3325 @pjcj Remove race conditions around mkdir.
pjcj authored
85 die "Cannot mkdir $d: $!" unless -d $d;
8b7484f @pjcj Put end to end tests in t/e2e.
pjcj authored
86 }
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
87 }
88
3c3aa91 @pjcj Improve self_cover make target.
pjcj authored
89 my @tests;
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
90 opendir D, "tests" or die "Cannot opendir tests: $!";
91 for my $t (readdir D)
92 {
93 next unless -f "tests/$t";
5bbf256 @acme get rid of another version
acme authored
94 next if $t =~ /\.(pm|pl|org|bak|uncoverable)$/;
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
95 next if $t =~ /~$/;
9f93b0b @pjcj import Devel::Cover 0.35
pjcj authored
96
3c3aa91 @pjcj Improve self_cover make target.
pjcj authored
97 push @tests, $t;
98
9f93b0b @pjcj import Devel::Cover 0.35
pjcj authored
99 if ($t =~ /\.t/)
100 {
56b80fd @pjcj Tidy up long lines.
pjcj authored
101 copy("tests/$t", "t/e2e/$t")
102 or die "Cannot copy tests/$t to t/e2e/$t: $!";
9f93b0b @pjcj import Devel::Cover 0.35
pjcj authored
103 next
104 }
105
8b7484f @pjcj Put end to end tests in t/e2e.
pjcj authored
106 open T, ">t/e2e/a$t.t" or die "Cannot open t/e2e/a$t.t: $!";
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
107 print T <<EOT;
108 #!$^X
109
c7f77d4 @pjcj I think my canonical mail address is here to stay.
pjcj authored
110 # Copyright 2002-2012, Paul Johnson (paul\@pjcj.net)
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
111
112 # This software is free. It is licensed under the same terms as Perl itself.
113
114 # The latest version of this software should be available from my homepage:
115 # http://www.pjcj.net
116
117 use strict;
118 use warnings;
119
120 use lib "$base/lib";
121 use lib "$base/blib/lib";
122 use lib "$base/blib/arch";
123 use lib "$base/t";
124
4b52873 @pjcj Remove Test.pm version req. from generated tests.
pjcj authored
125 use Devel::Cover::Test;
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
126
2c0be70 @pjcj Fix up creation of golden files.
pjcj authored
127 my \$test = Devel::Cover::Test->new("$t");
128 \$test->run_test;
37e017d @pjcj Remove some warnings.
pjcj authored
129 no warnings;
2c0be70 @pjcj Fix up creation of golden files.
pjcj authored
130 \$test # for create_gold
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
131 EOT
8b7484f @pjcj Put end to end tests in t/e2e.
pjcj authored
132 close T or die "Cannot close t/e2e/a$t.t: $!";
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
133 }
134 closedir D or die "Cannot closedir tests: $!";
135
3c3aa91 @pjcj Improve self_cover make target.
pjcj authored
136 s/^/tests\// for @tests;
9fd857f @pjcj Refactor testing for modules.
pjcj authored
137 push @tests, grep !/e2e/, glob "t/*/*.t";
3c3aa91 @pjcj Improve self_cover make target.
pjcj authored
138
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
139 print "done\n\n";
140
cd862b2 @pjcj JSON is not required, JSON::PP will do.
pjcj authored
141 my %checked;
142
9fd857f @pjcj Refactor testing for modules.
pjcj authored
143 sub check
144 {
145 my ($module, $text, $version) = @_;
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
146
9fd857f @pjcj Refactor testing for modules.
pjcj authored
147 printf "checking for %-18s %-16s .... ",
148 $module, $version ? "version $version" : "";
a0df00b @pjcj import Devel::Cover 0.27
pjcj authored
149
cd862b2 @pjcj JSON is not required, JSON::PP will do.
pjcj authored
150 {
151 local $SIG{__WARN__} = sub {};
152 eval "use $module";
153 }
9fd857f @pjcj Refactor testing for modules.
pjcj authored
154 (my $mod = $module) =~ s/::/\//g;
155 if (my $m = $INC{"$mod.pm"})
156 {
157 my $v = eval { no warnings; eval "\$${module}::VERSION" };
158 printf "%-8s $m\n", $v;
159 if ($version && $v < $version)
160 {
cd862b2 @pjcj JSON is not required, JSON::PP will do.
pjcj authored
161 print "\n\n\n$text\n" unless $checked{$text}++;
162 print "\n";
9fd857f @pjcj Refactor testing for modules.
pjcj authored
163 }
164 }
165 else
166 {
cd862b2 @pjcj JSON is not required, JSON::PP will do.
pjcj authored
167 print "not found";
168 print "\n\n\n$text\n" unless $checked{$text}++;
169 print "\n";
9fd857f @pjcj Refactor testing for modules.
pjcj authored
170 }
171 };
a0df00b @pjcj import Devel::Cover 0.27
pjcj authored
172
cd862b2 @pjcj JSON is not required, JSON::PP will do.
pjcj authored
173 my $d = <<EOM;
174 The coverage database can be stored in either Storable format or in JSON. To
175 use the Storable format, the Storable module is required. This has been a
176 core module since perl-5.8.0. To store the database in JSON format JSON::PP
177 can be used. This has been a core module since perl-5.14.0. If you wish, you
178 may install the JSON module which will be used in preference. This may be
179 configured to make database operations faster. If both formats are available,
180 JSON will be preferred by default. The JSON format should be portable between
181 all systems, whereas Storable format may not be.
a0df00b @pjcj import Devel::Cover 0.27
pjcj authored
182 EOM
183
cd862b2 @pjcj JSON is not required, JSON::PP will do.
pjcj authored
184 check "Storable", $d;
185 check "JSON", $d;
186 check "JSON::PP", $d;
ca796f0 @pjcj Test for JSON::PP.
pjcj authored
187
9fd857f @pjcj Refactor testing for modules.
pjcj authored
188 check "Digest::MD5", <<EOM;
b914a2d @pjcj Tidy up module checking somewhat.
pjcj authored
189 Digest::MD5 is required to check whether covered files have changed. You can
190 download Digest::MD5 from CPAN.
cb76b0d @pjcj import Devel::Cover 0.28
pjcj authored
191 EOM
192
9fd857f @pjcj Refactor testing for modules.
pjcj authored
193 check "Test::More", <<EOM;
b914a2d @pjcj Tidy up module checking somewhat.
pjcj authored
194 Test::More is required to run the Devel::Cover tests. You can download
195 Test::More from CPAN.
0c05955 @pjcj We now require Test::More to run the tests.
pjcj authored
196 EOM
197
9fd857f @pjcj Refactor testing for modules.
pjcj authored
198 check "Test::Warn", <<EOM;
b71a1ba @pjcj Tidy up Makefile.PL and META.yml.
pjcj authored
199 Test::Warn is required to run some of the Devel::Cover tests. You can
200 download Test::Warn from CPAN.
201 EOM
202
9fd857f @pjcj Refactor testing for modules.
pjcj authored
203 check "Template", <<EOM, "2.00";
b914a2d @pjcj Tidy up module checking somewhat.
pjcj authored
204 Template 2.00 is required to run the some HTML backends to cover and
fd354c7 @pjcj import Devel::Cover 0.44
pjcj authored
205 for cpancover. Unless you have specific requirements this should not be
f19d228 @pjcj import Devel::Cover 0.43
pjcj authored
206 a problem, but you will not be able to use these reports until you
207 install the Template Toolkit, available from CPAN. In the meantime you
208 may continue to use the rest of Devel::Cover.
209 EOM
210
9fd857f @pjcj Refactor testing for modules.
pjcj authored
211 my $m = <<EOM;
59e0e89 @pjcj Happy New Year!
pjcj authored
212 One of PPI::HTML 1.07 or Perl::Tidy 20060719 is required to add syntax
213 highlighting to some HTML backends to cover and for cpancover. Unless
214 you have specific requirements this should not be a problem, but you will
215 not be able to use syntax highlighting in these reports until you install
216 PPI::HTML or Perl::Tidy, available from the CPAN. In the meantime you
b01cc25 @pjcj Use Perl::Tidy as an alternative syntax highlighter (Sébastien Aperg…
pjcj authored
217 may continue to use the rest of Devel::Cover.
3c500fa @acme Add syntax highlighting to HTML_basic if PPI::HTML is installed (Leon…
acme authored
218 EOM
219
cd862b2 @pjcj JSON is not required, JSON::PP will do.
pjcj authored
220 check "PPI::HTML", $m, "1.07";
9fd857f @pjcj Refactor testing for modules.
pjcj authored
221 check "Perl::Tidy", $m, "20060719";
b6b6594 @pjcj import Devel::Cover 0.12
pjcj authored
222
9fd857f @pjcj Refactor testing for modules.
pjcj authored
223 print "checking for Pod::Coverage version 0.06 .... ";
224 my $e = <<EOM;
b914a2d @pjcj Tidy up module checking somewhat.
pjcj authored
225 Pod::Coverage 0.06 is required to do pod coverage. This will tell
b6b6594 @pjcj import Devel::Cover 0.12
pjcj authored
226 you how well you have documented your modules. Pod coverage will be
227 unavailable until you install this module, available from CPAN. In the
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
228 meantime, you may continue to use the rest of Devel::Cover.
b6b6594 @pjcj import Devel::Cover 0.12
pjcj authored
229 EOM
3884285 @pjcj import Devel::Cover 0.11
pjcj authored
230
231 eval "use Pod::Coverage";
232 if (my $m = $INC{"Pod/Coverage.pm"})
233 {
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
234 my $v = eval { no warnings; $Pod::Coverage::VERSION };
9fd857f @pjcj Refactor testing for modules.
pjcj authored
235 print $v < 0.06 ? "$v\n\n\n$e\n\n" : "$v $m\n";
236 print "checking for Pod::Coverage::CountParents .... ";
5309600 @pjcj Test against perl-5.8.7.
pjcj authored
237 $e = <<EOM;
238 Pod::Coverage::CountParents.pm is used for Pod coverage if it is available.
239 We will fall back to using Pod::Coverage.pm. If you want to use
240 Pod::Coverage::CountParents.pm, just install it from CPAN.
241 EOM
242 eval "use Pod::Coverage::CountParents";
243 if (my $m = $INC{"Pod/Coverage/CountParents.pm"})
244 {
245 my $v = eval { no warnings; $Pod::Coverage::CountParents::VERSION };
246 $v ||= " ";
9082b34 @pjcj Align module checking output.
pjcj authored
247 print "$v $m\n";
5309600 @pjcj Test against perl-5.8.7.
pjcj authored
248 }
249 else
250 {
9fd857f @pjcj Refactor testing for modules.
pjcj authored
251 print "not found\n\n\n$e\n\n";
5309600 @pjcj Test against perl-5.8.7.
pjcj authored
252 }
3884285 @pjcj import Devel::Cover 0.11
pjcj authored
253 }
254 else
255 {
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
256 print "not found\n\n$e\n";
3884285 @pjcj import Devel::Cover 0.11
pjcj authored
257 }
258
9fd857f @pjcj Refactor testing for modules.
pjcj authored
259 check "Test::Differences", <<EOM;
b914a2d @pjcj Tidy up module checking somewhat.
pjcj authored
260 Test::Differences is used to display output from failed tests.
fd354c7 @pjcj import Devel::Cover 0.44
pjcj authored
261 Hopefully there won't be any failed tests, but if there are you will get
262 output that may not be a model of clarity. If you do get test failures
263 and you fancy helping me by debugging them, then you might like to
264 consider installing Test::Differences. You can download
265 Test::Differences from CPAN.
c483236 @pjcj import Devel::Cover 0.39
pjcj authored
266 EOM
267
bd43b6f @sdt Add Browser::Open to Makefile.PL & dist.ini
sdt authored
268 check "Browser::Open", <<EOM;
269 Browser::Open is used to launch a web browser when the -launch flag is
270 specified with HTML report formats. You can download Browser::Open from CPAN.
271 EOM
272
aa6aab9 @pjcj Officially tested against 5.16.0.
pjcj authored
273 my $latest_tested = "5.016000";
7a80026 @pjcj import Devel::Cover 0.21
pjcj authored
274 print <<EOM if $] > $latest_tested;
275
276 Devel::Cover $Version has not been tested with perl $].
277 Testing will take place against expected output from perl $latest_tested.
278 You may well find failing tests.
279
280 EOM
281
fd354c7 @pjcj import Devel::Cover 0.44
pjcj authored
282 if ($] < 5.008)
283 {
284 print <<EOM;
f19d228 @pjcj import Devel::Cover 0.43
pjcj authored
285
286 Devel::Cover $Version is not fully functional on perl $]. It should
287 mostly work, but there are some constructs for which coverage will not
fd354c7 @pjcj import Devel::Cover 0.44
pjcj authored
288 be collected, and you may well encounter bugs which have been fixed in
95074d6 @pjcj Note increased minimum version recommendation.
pjcj authored
289 subsequent versions of perl. Perl versions 5.8.8 and above should work
fd354c7 @pjcj import Devel::Cover 0.44
pjcj authored
290 better.
f19d228 @pjcj import Devel::Cover 0.43
pjcj authored
291
292 EOM
293
fd354c7 @pjcj import Devel::Cover 0.44
pjcj authored
294 print <<EOM if $^O eq "MSWin32";
f19d228 @pjcj import Devel::Cover 0.43
pjcj authored
295 And things are even worse under Windows. You may well find random bugs
296 of various severities.
297
298 EOM
fd354c7 @pjcj import Devel::Cover 0.44
pjcj authored
299 }
c3a9588 @pjcj Test against perl-5.8.6.
pjcj authored
300 elsif ($] < 5.008002)
fd354c7 @pjcj import Devel::Cover 0.44
pjcj authored
301 {
302 print <<EOM;
303
304 Devel::Cover $Version mostly works on perl $], but you may encounter
305 strange behaviours (bugs) which have been fixed in subsequent versions
306 of perl. This is particularly true if you are running a threaded perl.
c3a9588 @pjcj Test against perl-5.8.6.
pjcj authored
307 Perl versions 5.8.2 and above should work better.
fd354c7 @pjcj import Devel::Cover 0.44
pjcj authored
308
309 EOM
310 }
f19d228 @pjcj import Devel::Cover 0.43
pjcj authored
311
a0df00b @pjcj import Devel::Cover 0.27
pjcj authored
312 print "\n" x 3;
313
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
314 $ExtUtils::MakeMaker::Verbose = 0;
315
316 WriteMakefile
317 (
b71a1ba @pjcj Tidy up Makefile.PL and META.yml.
pjcj authored
318 NAME => "Devel::Cover",
319 VERSION => $Version,
c7f77d4 @pjcj I think my canonical mail address is here to stay.
pjcj authored
320 AUTHOR => 'Paul Johnson <paul@pjcj.net>',
b71a1ba @pjcj Tidy up Makefile.PL and META.yml.
pjcj authored
321 ABSTRACT_FROM => "lib/Devel/Cover.pm",
322 DIR => [],
5906fef @wchristian moved the scripts to bin/
authored
323 EXE_FILES => [ map "bin/$_", qw( cover gcov2perl cpancover ) ],
b71a1ba @pjcj Tidy up Makefile.PL and META.yml.
pjcj authored
324 PERL_MALLOC_OK => 1,
325 PREREQ_PM => {
326 Storable => 0,
327 "Digest::MD5" => 0,
328 "Test::More" => 0,
329 "Test::Warn" => 0,
330 },
331 TYPEMAPS => [ "utils/typemap" ],
05c41b4 @pjcj Generate README automatically and keep out of git.
pjcj authored
332 clean => { FILES => "t/e2e/* cover_db* t/e2e/*cover_db README" },
333 dist => { COMPRESS => "gzip --best --force" },
334 test => { TESTS => "t/*/*.t" },
b71a1ba @pjcj Tidy up Makefile.PL and META.yml.
pjcj authored
335 realclean => $] < 5.008008 ?
336 {
337 FILES => "lib/Devel/Cover/Inc.pm",
338 POSTOP => "\$(RM_RF) cover_db t/e2e"
339 } :
340 { FILES => "lib/Devel/Cover/Inc.pm cover_db t/e2e" },
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
341 );
342
343 print "\n";
692f58f @pjcj import Devel::Cover 0.01
pjcj authored
344 print <<EOM if 0;
345
346 --------------------------------------------------------------------------------
347
348 I like to have some idea of the distribution of this software. To that end I
349 would be very grateful for mail from you. This will be used only to satisfy my
350 curiosity and to help me make decisions which may involve changes to the
351 module.
352
353 If you can run perlbug you can send me a success report with "make ok".
354 Failure reports with "make nok" are also appreciated.
355
356 If you have any questions or comments, mailing list details are available in the
357 README file, or send mail to me directly.
358
359 EOM
360
361 sub MY::postamble
362 {
3c3aa91 @pjcj Improve self_cover make target.
pjcj authored
363 my %tests;
364 @tests{@tests} = map { (my $t = $_) =~ s/\W/_/g; "cover_db_$t" } @tests;
3d64c34 @pjcj Run all reports under self_cover.
pjcj authored
365 my @reports =
df5e53a @pjcj Add vim report to self_cover.
pjcj authored
366 qw(compilation html_basic html_minimal html html_subtle sort text2 text
367 vim);
3c3aa91 @pjcj Improve self_cover make target.
pjcj authored
368
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
369 qq[
cd12b6b @pjcj Remove dependency on MANIFEST.
pjcj authored
370 tags :
371 \t ctags --recurse .
692f58f @pjcj import Devel::Cover 0.01
pjcj authored
372
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
373 README : lib/Devel/Cover.pm
a11aba6 @pjcj Add cpancover to EXE_FILES.
pjcj authored
374 \t TERMCAP= COLUMNS=80 pod2text -s lib/Devel/Cover.pm | \\
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
375 \$(PERL) -n \\
2585fae @pjcj import Devel::Cover 0.42
pjcj authored
376 -e 'print if (/NAME/ ... /^[A-Z ]+\$\$/) =~ /^\\d+\$\$/;' \\
377 -e 'print if (/SYNOPSIS/ ... /^[A-Z ]+\$\$/) =~ /^\\d+\$\$/;' \\
378 -e 'print if (/DESCRIPTION/ ... /^[A-Z ]+\$\$/) =~ /^\\d+\$\$/;' \\
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
379 > README
692f58f @pjcj import Devel::Cover 0.01
pjcj authored
380
e494e47 @pjcj Version is stored in Makefile.PL.
pjcj authored
381 show_version :
382 \t \@echo \$(VERSION)
383
692f58f @pjcj import Devel::Cover 0.01
pjcj authored
384 ppm : ppd pure_all
385 \t tar cf Devel-Cover.tar blib
386 \t gzip --best --force Devel-Cover.tar
387 \t \$(PERL) -pi.bak \\
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
388 -e 's/(OS NAME=")[^"]*/\$\$1MSWin32/;' \\
389 -e 's/(ARCHITECTURE NAME=")[^"]*/\$\$1MSWin32-x86-multi-thread/;' \\
6a889d3 @pjcj import Devel::Cover 0.48
pjcj authored
390 -e 's/(CODEBASE HREF=")[^"]*/\$\$1Devel-Cover.tar.gz/;' \\
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
391 Devel-Cover.ppd
392
9f93b0b @pjcj import Devel::Cover 0.35
pjcj authored
393 TAINT = -T
5c5be47 @pjcj Stash moose branch ...
pjcj authored
394 TAINT =
fd354c7 @pjcj import Devel::Cover 0.44
pjcj authored
395 COVER_OPTIONS =
9f93b0b @pjcj import Devel::Cover 0.35
pjcj authored
396
ffe2236 @pjcj import Devel::Cover 0.23
pjcj authored
397 _run : pure_all
4cb2ef6 @pjcj Add subs_only test.
pjcj authored
398 \t \$(PERL) \$(TAINT) -Iblib/lib -Iblib/arch -MDevel::Cover=-merge,0,`\$(PERL) -e '\$\$l = qx|grep __COVER__ \$\$ARGV[0]|; \$\$l =~ /__COVER__\\s+criteria\\s+(.*)/; (\$\$c = \$\$1 || "all") =~ s/\\s+/,/g; \$\$p = "\$\$1," if \$\$l =~ /__COVER__\\s+test_parameters\\s+(.*)/; print "\$\$p-coverage,\$\$c"' tests/\$(TEST)`,\$(COVER_OPTIONS) tests/\$(TEST)
fd354c7 @pjcj import Devel::Cover 0.44
pjcj authored
399
556e2b6 @pjcj Rename uncverable attribute to uncoverable_file.
pjcj authored
400 COVER_PARAMETERS = \$(PERL) -e '\$\$l = qx|grep __COVER__ \$\$ARGV[0]|; \$\$u = "-uncoverable_file \$\$1" if \$\$l =~ /__COVER__\\s+uncoverable_file\\s+(.*)/; (\$\$p) = \$\$l =~ /__COVER__\\s+cover_parameters\\s+(.*)/; print "\$\$u \$\$p"' tests/\$(TEST)
b768db3 @pjcj import Devel::Cover 0.45
pjcj authored
401
fd354c7 @pjcj import Devel::Cover 0.44
pjcj authored
402 html : _run
00584a9 @pjcj cover executable is now in the bin directory.
pjcj authored
403 \t \$(PERL) -Mblib bin/cover `\$(COVER_PARAMETERS)` -report html
b768db3 @pjcj import Devel::Cover 0.45
pjcj authored
404
f51d799 @pjcj Making html_basic prettier.
pjcj authored
405 basic : _run
00584a9 @pjcj cover executable is now in the bin directory.
pjcj authored
406 \t \$(PERL) -Mblib bin/cover `\$(COVER_PARAMETERS)` -report html_basic
f51d799 @pjcj Making html_basic prettier.
pjcj authored
407
8553592 @pjcj Allow for easier update of golden results for complicated tests.
pjcj authored
408 out : _run
00584a9 @pjcj cover executable is now in the bin directory.
pjcj authored
409 \t \$(PERL) -Mblib bin/cover `\$(COVER_PARAMETERS)` -report text > \$(TEST).out
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
410
8553592 @pjcj Allow for easier update of golden results for complicated tests.
pjcj authored
411 text : out
f193844 @nnunley Remove duplicated code paths between Branch and Condition.
nnunley authored
412 \t \$(VISUAL) \$(TEST).out
ffe2236 @pjcj import Devel::Cover 0.23
pjcj authored
413
2585fae @pjcj import Devel::Cover 0.42
pjcj authored
414 wrun : pure_all
415 \t \$(PERL) \$(TAINT) -Iblib/lib -Iblib/arch -MDevel::Cover=-ignore,blib,-merge,0 tests/\$(TEST)
416
da2bb07 @pjcj Add make prove target.
pjcj authored
417 prove : pure_all
418 \t \$(PERL) -Iutils -MDevel::Cover::BuildUtils=prove_command -le '\$\$c = prove_command and print \$\$c and system \$\$c'
419
420 tst : pure_all
421 \t \$(PERL) -Iutils -MDevel::Cover::BuildUtils=prove_command -le '\$\$c = prove_command and print \$\$c and system \$\$c and system "make test"'
422
f8bbc6f @pjcj Add make testdist target.
pjcj authored
423 testdist : pure_all
424 \t chdir tests/dist/\$(TEST); \$(PERL) Makefile.PL && make && DEVEL_COVER_TEST_OPTS=-Mblib=../../.. \$(PERL) -Mblib=../../.. ../../../bin/cover -test \$(COVER_OPTIONS)
425
9f93b0b @pjcj import Devel::Cover 0.35
pjcj authored
426 DB = cover_db
427
428 dump :
00584a9 @pjcj cover executable is now in the bin directory.
pjcj authored
429 \t \$(PERL) -Mblib bin/cover -dump_db \$(DB)
b8eeb86 @pjcj import Devel::Cover 0.33
pjcj authored
430
d2220be @pjcj I have a new favourite font.
pjcj authored
431 FONT = "Inconsolata 10"
67595a3 @pjcj Use makeh to strip time and pod data before diff.
pjcj authored
432 GEOM = 260x85+0+0
ccdbd36 @pjcj import Devel::Cover 0.29
pjcj authored
433
8553592 @pjcj Allow for easier update of golden results for complicated tests.
pjcj authored
434 diff : out
56d8eff @pjcj Move makeh into utils directory.
pjcj authored
435 \t \$(PERL) utils/makeh strip_criterion 'time' \$(TEST).out
436 \t \$(PERL) utils/makeh strip_criterion ' pod' \$(TEST).out
38061de nuked spurious run_test_at_end property
Xavier Caron authored
437 \t gvim -geom \$(GEOM) -d -font \$(FONT) `\$(PERL) -Mblib -MDevel::Cover::Test -e '\$\$t = Devel::Cover::Test->new("\$(TEST)"); print \$\$t->cover_gold'` \$(TEST).out
c8c4341 @pjcj import Devel::Cover 0.15
pjcj authored
438
439 gold : pure_all
11ce715 @pjcj Move create_gold into utils directory.
pjcj authored
440 \t \$(PERL) utils/create_gold \$(TEST)
692f58f @pjcj import Devel::Cover 0.01
pjcj authored
441
9f93b0b @pjcj import Devel::Cover 0.35
pjcj authored
442 all_test :
8c9c86f @pjcj Keep all_versions running make test.
pjcj authored
443 \t exec \$(PERL) utils/all_versions make test
9f93b0b @pjcj import Devel::Cover 0.35
pjcj authored
444
445 all_gold :
16355d0 @pjcj Add create_all_gold.
pjcj authored
446 \t \$(PERL) utils/create_all_gold \$(TEST)
9f93b0b @pjcj import Devel::Cover 0.35
pjcj authored
447
3c3aa91 @pjcj Improve self_cover make target.
pjcj authored
448 _delete_db : pure_all
024338c @pjcj Add a self_cover make target.
pjcj authored
449 \t rm -rf cover_db
3c3aa91 @pjcj Improve self_cover make target.
pjcj authored
450
3d64c34 @pjcj Run all reports under self_cover.
pjcj authored
451 _self_cover_tests : @{[sort values %tests]}
00584a9 @pjcj cover executable is now in the bin directory.
pjcj authored
452 \t DEVEL_COVER_SELF=1 \$(PERL) -Mblib -MDevel::Cover bin/cover -silent -write cover_db @{[sort values %tests]}
024338c @pjcj Add a self_cover make target.
pjcj authored
453
3d64c34 @pjcj Run all reports under self_cover.
pjcj authored
454 self_cover : _self_cover_reports
00584a9 @pjcj cover executable is now in the bin directory.
pjcj authored
455 \t \$(PERL) -Mblib bin/cover -report html_basic
df5e53a @pjcj Add vim report to self_cover.
pjcj authored
456 \t \$(PERL) -Mblib bin/cover -report vim
3c3aa91 @pjcj Improve self_cover make target.
pjcj authored
457
692f58f @pjcj import Devel::Cover 0.01
pjcj authored
458 ok :
459 \t \@$Perlbug -okay || echo "Please send your report manually to $Author"
460
461 nok :
462 \t \@$Perlbug -nokay || echo "Please send your report manually to $Author"
3c3aa91 @pjcj Improve self_cover make target.
pjcj authored
463 ] . "\n" .
3d64c34 @pjcj Run all reports under self_cover.
pjcj authored
464
a0fcd5a @pjcj Re-quieten self_cover.
pjcj authored
465 join "\n",
3d64c34 @pjcj Run all reports under self_cover.
pjcj authored
466 map("$tests{$_} : _delete_db\n" .
3c3aa91 @pjcj Improve self_cover make target.
pjcj authored
467 "\t \@echo Running $tests{$_}\n" .
468 "\t \@rm -rf $tests{$_}\n" .
dfbc2e7 @pjcj Keep the self_cover target noisy for now.
pjcj authored
469 "\t \@DEVEL_COVER_SELF=1 \$(PERL) -Mblib -MDevel::Cover=-db,$tests{$_},-silent,1,-coverage,all,-ignore,tests/,-coverage,pod-also_private-xx $_\n",
3d64c34 @pjcj Run all reports under self_cover.
pjcj authored
470 sort keys %tests),
471
472 "_self_cover_reports : @{[map qq(report_$_), @reports]}\n",
473
474 map("report_$_ : _self_cover_tests\n" .
475 "\t \@echo Generating $_ report\n" .
00584a9 @pjcj cover executable is now in the bin directory.
pjcj authored
476 "\t \@DEVEL_COVER_SELF=1 \$(PERL) -Mblib -MDevel::Cover bin/cover -silent -report $_ > /dev/null\n",
3d64c34 @pjcj Run all reports under self_cover.
pjcj authored
477 @reports)
692f58f @pjcj import Devel::Cover 0.01
pjcj authored
478 }
Something went wrong with that request. Please try again.