| 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
| |||||||||||||||||||||||||||||
| 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
Condition33%1/3
defined $cpu_count and $cpu_count > 0
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
| |||||||||||||||||||||||||||||
| 34 | { | ||||||||||||||||||||||||||||
| 35 | 1 | ▶ | $cpu_count = 8 if $cpu_count > 8; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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'); | |||||||||||||||||||||||||||