Branch Coverage

lib/Rex/CLI.pm
Criterion Covered Total %
branch 14 182 7.6


line true false branch
65 0 0 if ($opts{'Q'})
72 0 0 if ($opts{'m'})
77 0 0 if ($opts{'d'})
83 0 0 if ($opts{'c'}) { }
0 0 elsif ($opts{'C'}) { }
99 0 0 if ($opts{'h'}) { }
0 0 elsif ($opts{'v'} and not $opts{'T'}) { }
106 0 0 if ($opts{'q'})
108 0 0 if ($opts{'w'})
114 0 0 if ($opts{'f'}) { }
119 0 0 if (not -e $main::rexfile and ($ARGV[0] and $ARGV[0] =~ /:/u))
132 0 0 if ($opts{'H'})
133 0 0 if ($opts{'H'} =~ /^perl:(.*)/u) { }
136 0 0 if (ref $host_eval eq 'ARRAY') { }
150 0 0 if ($opts{'z'})
152 0 0 if ($host_eval =~ /\S/msux) { }
160 0 0 if ($opts{'z'})
162 0 0 if ($host_eval =~ /\S/msux) { }
170 0 0 if ($opts{'o'})
177 0 0 if $opts{'E'}
179 0 0 if ($opts{'g'} or $opts{'G'})
184 0 0 if (ref $opts{'g'} ne 'ARRAY') { }
200 0 0 if ($opts{'u'})
207 0 0 if ($opts{'p'})
210 0 0 unless ($opts{'P'})
220 0 0 if ($opts{'P'})
229 0 0 if ($opts{'K'})
238 0 0 if ($pass_auth)
246 0 0 if ($opts{'T'} and $opts{'m'}) { }
0 0 elsif ($opts{'T'} and $opts{'y'}) { }
0 0 elsif ($opts{'T'}) { }
281 0 0 unless exists $opts{'F'}
282 0 0 unless exists $opts{'F'}
287 0 0 if (exists $opts{'s'})
290 0 0 if (exists $opts{'S'})
294 0 0 if (exists $opts{'t'})
298 0 0 if ($opts{'e'}) { }
0 0 elsif ($opts{'M'}) { }
309 0 0 if ($Rex::CLI::EVAL_ERROR)
314 0 0 if (exists $opts{'t'})
320 0 0 if ($opts{'u'})
324 0 0 if ($opts{'p'})
327 0 0 unless ($opts{'P'})
332 0 0 if ($opts{'P'})
336 0 0 if ($opts{'K'})
340 0 0 if ($pass_auth)
345 0 0 if ($opts{'H'})
366 0 0 if ($opts{'b'})
375 0 0 if ($Rex::CLI::EVAL_ERROR)
387 0 0 unless defined $color
389 0 0 if ($no_color) { }
483 0 0 if ($opts{'a'}) { }
490 0 0 if (defined $ARGV[0])
494 0 0 unless @tasks
498 0 0 unless @tasks
511 0 0 if $last_namespace ne _namespace($task)
520 0 0 if ($opts{'v'})
529 0 0 unless $full_task_name =~ /:/u
538 0 0 unless "Rex::Batch"->get_batchs
551 0 0 if ($opts{'v'})
564 0 0 unless @envs
566 0 0 if scalar @envs
583 0 0 unless @group_names
600 0 0 if $opts{'T'}
603 0 0 unless @summary
607 0 0 unless (@failures)
619 0 0 unless ncmp($Rex::CLI::a->{'task'}, $Rex::CLI::b->{'task'})
623 0 0 if ($_->{'error_message'})
634 0 0 if (not $Rex::CLI::OSNAME =~ /^MSWin/u) { }
635 0 0 if (-f "$rexfile.lock" and not exists $opts{'F'})
643 0 0 if ($Rex::CLI::CHILD_ERROR == 0) { }
655 0 0 unless open my $f, ">", "$rexfile.lock"
671 0 0 unless -f $server_ini_file
673 0 0 if (-f $server_ini_file and "Rex::Group::Lookup::INI"->is_loadable)
683 1 8 unless (-f $rexfile)
684 1 0 unless (exists $opts{'e'})
706 7 21 if ($load_file eq "__Rexfile__.pm")
707 0 7 unless open my $fh, "<", $rexfile
719 0 47 if ($line =~ /^__(DATA|END)__$/u)
729 7 0 if ($found_end == 0)
759 2 4 if (@warnings)
773 2 6 if ($Rex::CLI::EVAL_ERROR)
782 2 6 $line =~ /CLI[.]pm[ ]line[ ]\d+/msux ? :
811 0 0 unless $signal
814 0 0 unless exists $opts{'F'}
815 0 0 unless exists $opts{'F'}
819 0 0 if (not $signal and $opts{'o'} and defined "Rex::Output"->get)
828 0 0 if ($Rex::WITH_EXIT_STATUS)
829 0 0 if defined $exit_code_override
833 0 0 if $exit_code > 255
834 0 0 if $exit_code != 0