Branch Coverage

blib/lib/Test/Smoke/Util.pm
Criterion Covered Total %
branch 238 364 65.3


line true false branch
279 0 28 unless $command =~ m[^\s*\./Configure\s+(.*)]
282 8 64 if /^-[des]{1,3}$/
283 8 56 if /^-Dusedevel$/
284 6 50 if (/^-Accflags=(['"]?)(.+)\1/)
289 0 50 unless exists $opt_map{$option}
290 12 38 $value ? :
291 8 42 if $option =~ /^-U/
295 2 26 if ($cmdln =~ /-Uusei?threads\b/)
299 0 28 if ($cmdln =~ /-Dusequadmath\b/)
304 26 2 if (not $cmdln =~ /-Uuseimpsys\b/) { }
305 0 2 if ($opts{'USE_MULTI'} or $opts{'USE_ITHREADS'} or $opts{'USE_IMP_SYS'})
310 2 0 if ($opts{'USE_MULTI'} or $opts{'USE_ITHREADS'})
316 0 28 if $opts{'USE_GCC_V3_2'}
319 0 28 if $opts{'GCC_4XX'}
322 0 28 if $opts{'BCCOLD'}
327 0 28 unless my $maker = $win32_makefile_map{$win32_maker}
332 0 28 unless open ORG, "<:crlf", $in
333 0 28 unless open NEW, ">:crlf", $out
336 532 1820 if ($donot_change) { }
338 28 504 if (/^\s*CFG_VARS\s*=/)
339 28 0 $is_nmake || $is_gmake ? :
347 28 1792 if ($donot_change = /^#+ CHANGE THESE ONLY IF YOU MUST #+/)
349 14 14 $win32_maker eq 'nmake' ? :
353 4 24 if $buildopt
358 266 1554 if (/^\s*#?\s*$def_re(\s*[\*:]?=\s*define)$/) { }
28 1526 elsif (/\s*#?\s*($undef_re)(\s*[*:]?=\s*undef)$/) { }
28 1498 elsif (/^\s*#?\s*(CFG\s*[*:]?=\s*Debug)$/) { }
28 1470 elsif (/^\s*#?\s*(BUILD_STATIC)\s*([*:]?=)\s*(.*)$/) { }
359 120 146 $opts{$1} ? :
362 26 2 $opts{$1} ? :
365 0 28 $opts{'USE_DEBUGGING'} ? :
369 2 26 if ($config_args =~ /-([UD])useshrplib\b/)
370 0 2 $1 eq 'D' ? :
375 72 6138 if (/^\s*#?\s*($cfg_var\s*(\*|:)?=)\s*(.*)$/)
377 26 46 if $_ =~ /^#/ and not $opts{$cfg_var}
378 20 26 $opts{$cfg_var} ? :
402 0 0 unless $^O eq "VMS"
407 0 0 unless (-d $dir)
411 0 0 unless chdir $dir
418 0 0 unless open TSBRL, "> tsbuildrl.com"
440 3 2 if defined $cfg_name and -f $cfg_name
444 0 2 if -f $cfg_name and -s _
448 0 2 if -f $cfg_name and -s _
463 0 16 unless defined $logfile
465 0 16 unless open my $fh, "<", $logfile
470 0 16 if $@
471 0 16 if $@
473 0 16 if $@
474 0 16 $@ ? :
485 0 70 unless defined $smokelog
486 0 70 if not $cc or $cc eq "g++" or $cc eq "clang"
570 0 70 unless exists $OS2PAT{lc $cc}
574 70 0 if ($smokelog) { }
575 0 70 if $verbose
585 0 1260 if $msg =~ /^try\.c:[ :0-9]+\bwarning:/
596 9 61 wantarray ? :
609 0 68 unless $smokelog
627 8 60 wantarray ? :
647 59 23 unless (open PLEVEL, "< $plevel")
653 2 3943 if /#define PERL_PATCHNUM\s+(\d+)/
654 38 3907 if $seen and /^\s*,"(.+)"/
655 23 3922 if /^\s*static.+?local_patches\[\]/
658 2 21 if (defined $patchnum)
682 0 17 unless open PLIN, "< $plh"
683 0 17 unless open PLOUT, "> $pln"
687 17 2571 if (/^(\s+),NULL/ and $seen)
693 17 2571 if /local_patches\[\]/
697 0 17 unless close PLOUT
699 0 17 unless ($done)
707 0 17 if (-e $plb)
713 0 17 unless (rename $plh, $plb)
718 0 17 unless (rename $pln, $plh)
738 2 1 unless defined $config_file
753 0 1 unless (open CONF, "< $config_file")
761 2 12 if /^#/
762 11 1 if /\s/
763 1 11 if (m[^/])
765 0 1 unless defined $1
770 7 4 unless (/^=/)
777 0 4 if (@target > 1)
782 1 0 if (keys %conf == 1 and exists $conf{''} and not @target)
791 1 3 unless (@conf)
793 0 1 if @target
801 0 6 if $val > 1
806 1 2 if (@target)
832 3 9 if (open DOTPATCH, "< $dot_patch")
836 3 0 if ($patch_level)
837 1 2 if ($patch_level =~ /\s/)
850 2 7 if (open my $gvh, "<", $git_version_h)
852 1 13 if ($line =~ /^#define PERL_PATCHNUM "(.+)"$/)
864 5 3 if (open PATCHLEVEL_H, "< $patchlevel_h")
867 2 297 if /#define PERL_PATCHNUM\s+(\d+)/
869 294 5 unless $declaration_seen and /^\s+,"(?:(?:DEVEL|MAINT)(\d+)?)|(RC\d+)"/
872 1 4 if ($patch_level =~ /^RC/) { }
876 2 2 $patchnum ? :
897 5 15 if (open PATCHLEVEL, "< $file")
901 1 4 if ($patchlevel =~ /^#define PATCHLEVEL\s+(\d+)/m)
904 1 0 $patchlevel =~ /^#define SUBVERSION\s+(\d+)/m ? :
909 4 0 $patchlevel =~ /^#define PERL_REVISION\s+(\d+)/m ? :
911 4 0 $patchlevel =~ /^#define PERL_VERSION\s+(\d+)/m ? :
913 4 0 $patchlevel =~ /^#define PERL_SUBVERSION\s+(\d+)/m ? :
955 0 1 unless local $_ = shift()
957 0 1 if (/aix/i)
963 0 1 if (/(?:darwin|.*bsd)/i)
969 0 1 if (/hp-?ux/i)
975 0 1 if (/irix/i)
981 1 0 if (/linux/i)
983 1 0 if (open PROC, "< /proc/cpuinfo")
987 1 0 @output ? :
991 0 0 if (/solaris|sunos|osf/i)
997 0 0 if (/mswin32|cygwin/i)
999 0 0 exists $ENV{'NUMBER_OF_PROCESSORS'} ? :
1003 0 0 if (/vms/i)
1005 0 0 @output ? :
1009 0 0 if (/haiku/i)
1011 0 0 unless ($@)
1023 1 0 $cpus ne '1' ? :
1 0 $cpus ? :
1045 1 171 if (open CONF, "< $perl_Config_heavy")
1048 8 7 if (/^(?: (?:our|my)\ \$[cC]onfig_[sS][hH].* | \$_ )\ =\ <<'!END!';/x .. /^!END!/)
1053 2 6 if /!END!(?:';)?$/
1054 1 5 unless /^([^=]+)='([^']*)'/
1055 5 0 if exists $Config{lc $1}
1063 2 170 if (open CONF, "< $perl_Config_pm")
1066 16 15 if (/^(?: (?:our|my)\ \$[cC]onfig_[sS][hH].* | \$_ )\ =\ <<'!END!';/x .. /^!END!/)
1071 4 12 if /!END!(?:';)?$/
1072 2 10 unless /^([^=]+)='([^']*)'/
1073 10 0 if exists $conf2{lc $1}
1081 144 28 if (open CONF, "< $perl_config_sh")
1083 296 148 unless /^([^=]+)='([^']*)'/
1084 101 47 if exists $conf2{$1}
1091 119 53 if (keys %conf2)
1095 3 116 if exists $conf2{'osname'}
1096 3 116 if exists $conf2{'osvers'}
1097 3 116 if exists $conf2{'archname'}
1099 19 100 if exists $conf2{'version'}
1103 119 53 if exists $Config{'version'}
1119 0 10 $report =~ /^Automated.+branch (.+?) / ? :
1120 10 0 $report =~ /^Automated.*for(?: branch \S+)? (.+) patch/ ? :
1121 10 0 $report =~ /^Automated.+?(\S+)$/m ? :
1123 0 10 unless ($plevel)
1124 0 0 $report =~ /^Auto.*patch\s+\S+\s+(\S+)/ ? :
1126 10 0 $report =~ /\bon\s+(.*) - / ? :
1127 10 0 $report =~ /\bon\s+.* - (.*)/ ? :
1129 10 0 $report =~ /:.* \((.*)\)/ ? :
1130 10 0 $report =~ /^Summary: (.*)/m ? :
1151 2 12 if -f $regen_headers_pl
1154 2 10 if -f $regen_headers_pl
1171 0 0 unless (defined $regen_headers)
1176 0 0 if $verbose
1178 0 0 if (open REGENH, "$regen_headers |") { }
1179 0 0 if $verbose > 1
1180 0 0 unless (close REGENH)
1201 0 30 unless $prog
1202 0 30 if $^O eq "VMS"
1215 18 223 if (-x $fname)
1217 0 18 $fname =~ /\s/ ? :
1238 0 0 if ($@) { }
1243 0 0 if scalar $syms->getsym($prog)
1248 0 0 /$img_re/ ? :
1251 0 0 if exists $kfe{uc $prog}
1262 0 0 if (-x $fname)
1263 0 0 $ext eq '.COM' ? :
1280 0 304 if ($^O eq "VMS")
1282 0 0 if (@parts > 1)
1287 0 304 $NOCASE ? :
1317 2 7 if ($killtime =~ /^\+(\d+):([0-5]?[0-9])$/) { }
6 1 elsif ($killtime =~ /^((?:[0-1]?[0-9])|(?:2[0-3])):([0-5]?[0-9])$/) { }
1320 3 3 unless defined $from
1325 4 2 if $kill_min <= 0
1342 4 13 $diff < 300 ? :
17 116 $diff =~ /\./ ? :
1352 1 1 $days == 1 ? :
2 131 if $days
1353 8 11 $hour == 1 ? :
19 114 if $hour
1354 1 49 $mins == 1 ? :
50 83 if $mins
1355 104 20 if $diff and not $days and not $hour
1370 0 0 if ($@) { }
1381 0 0 exists $p2u_opt{'exitval'} ? :
1383 0 0 if exists $p2u_opt{'myusage'}