Branch Coverage

blib/lib/Test/RedisServer.pm
Criterion Covered Total %
branch 23 48 47.9


line true false branch
53 14 0 unless (defined $self->conf->{'port'} or defined $self->conf->{'unixsocket'})
58 14 0 unless (defined $self->conf->{'dir'})
62 0 14 if ($self->conf->{'loglevel'} and $self->conf->{'loglevel'} eq "warning")
67 14 0 if ($self->auto_start)
74 0 14 if defined $self->pid and $$ == $self->_owner_pid
80 0 14 if defined $self->pid
83 0 14 unless open my $logfh, ">>", "$tmpdir/redis-server.log"
87 0 14 unless defined $pid
89 7 7 if ($pid == 0)
90 0 7 unless open STDOUT, ">&", $logfh
91 0 7 unless open STDERR, ">&", $logfh
101 7 14 if (waitpid($pid, 1) > 0) { }
107 14 0 if (open $logfh, "<", "$tmpdir/redis-server.log")
115 0 14 if ($log =~ /[Rr]eady to accept connections/)
124 7 0 unless ($ready)
125 0 7 if ($self->pid)
134 7 0 if (open $logfh, "<", "$tmpdir/redis-server.log")
157 0 7 unless open my $conffh, ">", "$tmpdir/redis.conf"
162 7 0 unless (CORE::exec "redis-server", "$tmpdir/redis.conf")
163 7 0 if ($! == 2) { }
177 0 0 unless defined $self->pid
186 0 0 unless (-f $self->tmpdir)
222 0 0 if ($port and $port > 0) { }
240 0 21 unless defined $v