Branch Coverage

blib/lib/Test/Smoke/Util.pm
Criterion Covered Total %
branch 245 378 64.8


line true false branch
289 6 0 s/^-Accflags=(["']?)(.+?)\1// ? :
295 0 0 s/^-Aldflags=(["']?)(.+?)\1// ? :
299 0 28 unless $command =~ m[^\s*\./Configure\s+(.*)]
302 8 64 if /^-[des]{1,3}$/
303 8 56 if /^-Dusedevel$/
304 6 50 if /^-A(ccflags|ldflags)/
305 50 0 if (my($option, $value) = /^(-[DU]\w+)(?:=(.+))?$/)
306 0 50 unless exists $opt_map{$option}
307 12 38 $value ? :
308 8 42 if $option =~ /^-U/
313 2 26 if ($cmdln =~ /-Uusei?threads\b/)
317 0 28 if ($cmdln =~ /-Dusequadmath\b/)
322 26 2 if (not $cmdln =~ /-Uuseimpsys\b/) { }
323 0 2 if ($opts{'USE_MULTI'} or $opts{'USE_ITHREADS'} or $opts{'USE_IMP_SYS'})
328 2 0 if ($opts{'USE_MULTI'} or $opts{'USE_ITHREADS'})
334 0 28 if $opts{'USE_GCC_V3_2'}
337 0 28 if $opts{'GCC_4XX'}
340 0 28 if $opts{'BCCOLD'}
345 0 28 unless my $maker = $win32_makefile_map{$win32_maker}
349 0 28 unless open ORG, "<:raw", $in
352 0 28 $dummy =~ /\015\012\Z/ ? :
354 0 28 unless open ORG, "<$layer", $in
355 0 28 unless open NEW, ">:crlf", $out
357 0 28 $adjust_ldflags ? :
359 532 1918 if ($donot_change) { }
361 28 504 if (/^\s*CFG_VARS\s*=/)
362 28 0 $is_nmake || $is_gmake ? :
374 266 1652 if (/^\s*#?\s*$def_re(\s*[\*:]?=\s*define)$/) { }
28 1624 elsif (/\s*#?\s*($undef_re)(\s*[*:]?=\s*undef)$/) { }
28 1596 elsif (/^\s*#?\s*(CFG\s*[*:]?=\s*Debug)$/) { }
28 1568 elsif (/^\s*#?\s*(BUILD_STATIC)\s*([*:]?=)\s*(.*)$/) { }
28 1540 elsif (/^\s*#?\s*(BUILDOPT)\s*([*:]?)=\s*\$\(BUILDOPTEXTRA\)/) { }
375 120 146 $opts{$1} ? :
378 26 2 $opts{$1} ? :
381 0 28 $opts{'USE_DEBUGGING'} ? :
385 2 26 if ($config_args =~ /-([UD])useshrplib\b/)
386 0 2 $1 eq 'D' ? :
390 14 14 $2 ? :
391 4 24 if ($adjust_ccflags)
396 0 28 if ($adjust_ldflags)
403 72 7961 if (/^\s*#?\s*($cfg_var\s*(\*|:)?=)\s*(.*)$/)
405 26 46 if $_ =~ /^#/ and not $opts{$cfg_var}
406 20 26 $opts{$cfg_var} ? :
430 0 0 unless $^O eq "VMS"
435 0 0 unless (-d $dir)
439 0 0 unless chdir $dir
446 0 0 unless open TSBRL, "> tsbuildrl.com"
468 3 2 if defined $cfg_name and -f $cfg_name
472 0 2 if -f $cfg_name and -s _
476 0 2 if -f $cfg_name and -s _
491 0 16 unless defined $logfile
493 0 16 unless open my $fh, "<", $logfile
498 0 16 if $@
499 0 16 if $@
501 0 16 if $@
502 0 16 $@ ? :
513 0 70 unless defined $smokelog
514 0 70 if not $cc or $cc eq "g++" or $cc eq "clang"
598 0 70 unless exists $OS2PAT{lc $cc}
602 70 0 if ($smokelog) { }
603 0 70 if $verbose
613 0 1260 if $msg =~ /^try\.c:[ :0-9]+\bwarning:/
624 9 61 wantarray ? :
637 0 68 unless $smokelog
655 8 60 wantarray ? :
675 59 23 unless (open PLEVEL, "< $plevel")
681 2 3943 if /#define PERL_PATCHNUM\s+(\d+)/
682 38 3907 if $seen and /^\s*,"(.+)"/
683 23 3922 if /^\s*static.+?local_patches\[\]/
686 2 21 if (defined $patchnum)
710 0 17 unless open PLIN, "< $plh"
711 0 17 unless open PLOUT, "> $pln"
715 17 2571 if (/^(\s+),NULL/ and $seen)
721 17 2571 if /local_patches\[\]/
725 0 17 unless close PLOUT
727 0 17 unless ($done)
735 0 17 if (-e $plb)
741 0 17 unless (rename $plh, $plb)
746 0 17 unless (rename $pln, $plh)
766 2 1 unless defined $config_file
781 0 1 unless (open CONF, "< $config_file")
789 2 12 if /^#/
790 11 1 if /\s/
791 1 11 if (m[^/])
793 0 1 unless defined $1
798 7 4 unless (/^=/)
805 0 4 if (@target > 1)
810 1 0 if (keys %conf == 1 and exists $conf{''} and not @target)
819 1 3 unless (@conf)
821 0 1 if @target
829 0 6 if $val > 1
834 1 2 if (@target)
860 3 9 if (open DOTPATCH, "< $dot_patch")
864 3 0 if ($patch_level)
865 1 2 if ($patch_level =~ /\s/)
878 2 7 if (open my $gvh, "<", $git_version_h)
880 1 13 if ($line =~ /^#define PERL_PATCHNUM "(.+)"$/)
892 5 3 if (open PATCHLEVEL_H, "< $patchlevel_h")
895 2 297 if /#define PERL_PATCHNUM\s+(\d+)/
897 294 5 unless $declaration_seen and /^\s+,"(?:(?:DEVEL|MAINT)(\d+)?)|(RC\d+)"/
900 1 4 if ($patch_level =~ /^RC/) { }
904 2 2 $patchnum ? :
925 5 15 if (open PATCHLEVEL, "< $file")
929 1 4 if ($patchlevel =~ /^#define PATCHLEVEL\s+(\d+)/m)
932 1 0 $patchlevel =~ /^#define SUBVERSION\s+(\d+)/m ? :
937 4 0 $patchlevel =~ /^#define PERL_REVISION\s+(\d+)/m ? :
939 4 0 $patchlevel =~ /^#define PERL_VERSION\s+(\d+)/m ? :
941 4 0 $patchlevel =~ /^#define PERL_SUBVERSION\s+(\d+)/m ? :
983 0 1 unless local $_ = shift()
985 0 1 if (/aix/i)
991 0 1 if (/(?:darwin|.*bsd)/i)
997 0 1 if (/hp-?ux/i)
1003 0 1 if (/irix/i)
1009 1 0 if (/linux/i)
1011 1 0 if (open PROC, "< /proc/cpuinfo")
1015 1 0 @output ? :
1019 0 0 if (/solaris|sunos|osf/i)
1025 0 0 if (/mswin32|cygwin/i)
1027 0 0 exists $ENV{'NUMBER_OF_PROCESSORS'} ? :
1031 0 0 if (/vms/i)
1033 0 0 @output ? :
1037 0 0 if (/haiku/i)
1039 0 0 unless ($@)
1051 1 0 $cpus ne '1' ? :
1 0 $cpus ? :
1073 1 171 if (open CONF, "< $perl_Config_heavy")
1076 8 7 if (/^(?: (?:our|my)\ \$[cC]onfig_[sS][hH].* | \$_ )\ =\ <<'!END!';/x .. /^!END!/)
1081 2 6 if /!END!(?:';)?$/
1082 1 5 unless /^([^=]+)='([^']*)'/
1083 5 0 if exists $Config{lc $1}
1091 2 170 if (open CONF, "< $perl_Config_pm")
1094 16 15 if (/^(?: (?:our|my)\ \$[cC]onfig_[sS][hH].* | \$_ )\ =\ <<'!END!';/x .. /^!END!/)
1099 4 12 if /!END!(?:';)?$/
1100 2 10 unless /^([^=]+)='([^']*)'/
1101 10 0 if exists $conf2{lc $1}
1109 144 28 if (open CONF, "< $perl_config_sh")
1111 296 148 unless /^([^=]+)='([^']*)'/
1112 101 47 if exists $conf2{$1}
1119 119 53 if (keys %conf2)
1123 3 116 if exists $conf2{'osname'}
1124 3 116 if exists $conf2{'osvers'}
1125 3 116 if exists $conf2{'archname'}
1127 19 100 if exists $conf2{'version'}
1131 119 53 if exists $Config{'version'}
1147 0 10 $report =~ /^Automated.+branch (.+?) / ? :
1148 10 0 $report =~ /^Automated.*for(?: branch \S+)? (.+) patch/ ? :
1149 10 0 $report =~ /^Automated.+?(\S+)$/m ? :
1151 0 10 unless ($plevel)
1152 0 0 $report =~ /^Auto.*patch\s+\S+\s+(\S+)/ ? :
1154 10 0 $report =~ /\bon\s+(.*) - / ? :
1155 10 0 $report =~ /\bon\s+.* - (.*)/ ? :
1157 10 0 $report =~ /:.* \((.*)\)/ ? :
1158 10 0 $report =~ /^Summary: (.*)/m ? :
1179 2 12 if -f $regen_headers_pl
1182 2 10 if -f $regen_headers_pl
1199 0 0 unless (defined $regen_headers)
1204 0 0 if $verbose
1206 0 0 if (open REGENH, "$regen_headers |") { }
1207 0 0 if $verbose > 1
1208 0 0 unless (close REGENH)
1229 0 30 unless $prog
1230 0 30 if $^O eq "VMS"
1243 18 223 if (-x $fname)
1267 0 0 if ($@) { }
1272 0 0 if scalar $syms->getsym($prog)
1277 0 0 /$img_re/ ? :
1280 0 0 if exists $kfe{uc $prog}
1291 0 0 if (-x $fname)
1292 0 0 $ext eq '.COM' ? :
1309 0 304 if ($^O eq "VMS")
1311 0 0 if (@parts > 1)
1316 0 304 $NOCASE ? :
1346 2 7 if ($killtime =~ /^\+(\d+):([0-5]?[0-9])$/) { }
6 1 elsif ($killtime =~ /^((?:[0-1]?[0-9])|(?:2[0-3])):([0-5]?[0-9])$/) { }
1349 3 3 unless defined $from
1354 4 2 if $kill_min <= 0
1371 6 14 $diff < 300 ? :
20 116 $diff =~ /\./ ? :
1382 2 134 if $diff >= 60
1385 1 1 $days == 1 ? :
2 134 if $days
1386 8 11 $hour == 1 ? :
19 117 if $hour
1387 1 52 $mins == 1 ? :
53 83 if $mins
1388 105 20 if $diff and not $days and not $hour
1403 0 0 if ($@) { }
1414 0 0 exists $p2u_opt{'exitval'} ? :
1416 0 0 if exists $p2u_opt{'myusage'}