run_test.pl

filter: Statementstmt 92.3% 36 / 39 Branchbran 40.0% 4 / 10 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 78.6% 48 / 61 CC 1 SCAR 0.0
CC
1
Cov
79%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« script/ppkg-config ↑ Summary
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use blib;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use Test::Harness;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use File::Spec;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use File::Glob qw( bsd_glob );
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use lib map { File::Spec->rel2abs($_) } qw( blib/lib blib/arch );
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 eval {
10 1 require PkgConfig;
11 1 print "\nTesting PkgConfig $PkgConfig::VERSION, Perl $], $^X\n";
12 };
13  
14 1 my $cpu_count;
15  
16 1 ▶if(defined $ENV{NUMBER_OF_PROCESSORS})
Branch: 3 branches
BranchTrueFalseTotal
if (defined $ENV{'NUMBER_OF_PROCESSORS'}) { } 0 1 1
elsif (-r '/proc/cpuinfo') { } 1 0 1
elsif ($^O eq 'darwin') { } 0 0 0
17 {
18 0 $cpu_count = $ENV{NUMBER_OF_PROCESSORS};
19 }
20 elsif(-r "/proc/cpuinfo")
21 {
22 1 my $fh;
23 1 open $fh, '<', '/proc/cpuinfo';
24 1 $cpu_count = scalar grep /^processor\s/, <$fh>;
25 1 close $fh;
26 }
27 elsif($^O eq 'darwin')
28 {
29 0 $cpu_count = `sysctl -n hw.ncpu`;
30 0 chomp $cpu_count;
31 }
32  
33 1 ▶if(defined $cpu_count && $cpu_count > 0)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $cpu_count and $cpu_count > 0) 1 0 1
Condition33%1/3
defined $cpu_count and $cpu_count > 0
!ll&&!rl&&r
001
MC/DC0%0/2
defined $cpu_count and $cpu_count > 0
defined $cpu_count $cpu_count > 0
Truth table33%1/3
A and B
A= defined $cpu_countB= $cpu_count > 0
ABresult
0X0
100
111
34 {
35 1 ▶ $cpu_count = 8 if $cpu_count > 8;
Branch: 1 branch
BranchTrueFalseTotal
if $cpu_count > 8 1 0 1
36 1 print "Testing on $cpu_count CPUS\n";
37 1 $ENV{HARNESS_OPTIONS} = "j$cpu_count";
38 }
39  
40 1 Test::Harness::runtests(bsd_glob 't/*.t');
« script/ppkg-config ↑ Summary