bin/ubic-watchdog

filter: Statementstmt 70.8% 17 / 24 Branchbran 66.6% 4 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 74.2% 26 / 35 SCAR 0.3
CC
1
Cov
70%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« bin/ubic-update ↑ Summary bin/ubic-admin »
1 #!/usr/bin/env perl
2 package ubic_watchdog;
3 1 $ubic_watchdog::VERSION = '1.59';
4 185 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 921 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # ABSTRACT: watchdog which checks all ubic services.
8  
9  
10 185 ▶use Getopt::Long 2.33;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 93 ▶use Pod::Usage;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 93 ▶use Ubic::Watchdog;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 1 ▶return 1 if caller();
Branch: 1 branch
BranchTrueFalseTotal
if caller() 1 92 93
16 0 ▶unless (grep { $_ eq '/usr/local/bin' } split /:/, $ENV{PATH}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (grep {$_ eq "/usr/local/bin";} split(/:/, $ENV{"PATH"}, 0)) 0 92 92
17 0 $ENV{PATH} = "/usr/local/bin:$ENV{PATH}";
18 }
19  
20 0 my $compile_timeout = 10;
21 0 my $verbose;
22  
23 0 ▶GetOptions(
Branch: 1 branch
BranchTrueFalseTotal
&GetOptions("v|verbose", \$verbose, "compile-timeout=i", \$compile_timeout) or pod2usage(2) 0 92 92
24 'v|verbose' => \$verbose,
25 'compile-timeout=i' => \$compile_timeout,
26 ) or pod2usage(2);
27  
28 0 Ubic::Watchdog->run(
29 glob_filter => \@ARGV,
30 verbose => $verbose,
31 compile_timeout => $compile_timeout,
32 );
33  
34 __END__
« bin/ubic-update ↑ Summary bin/ubic-admin »