Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make sure REDIS_SERVER_PATH works

Signed-off-by: Pedro Melo <melo@simplicidade.org>
  • Loading branch information...
commit 843a832ae3282872904ac6ba270457fb8e3b2ac6 1 parent 80da1a6
@melo melo authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 t/tlib/Test/SpawnRedisServer.pm
View
5 t/tlib/Test/SpawnRedisServer.pm
@@ -27,13 +27,14 @@ sub redis {
Test::More::diag("Redis port $port, cfg $fn") if $ENV{REDIS_DEBUG};
- if (! can_run('redis-server')) {
+ my $redis_server_path = $ENV{REDIS_SERVER_PATH} || 'redis-server';
+ if (! can_run($redis_server_path)) {
Test::More::plan skip_all => "Could not find binary redis-server";
return;
}
my $c;
- eval { $c = spawn_server($ENV{REDIS_SERVER_PATH} || 'redis-server', $fn) };
+ eval { $c = spawn_server($redis_server_path, $fn) };
if (my $e = $@) {
Test::More::plan skip_all => "Could not start redis-server: $@";
return;
Please sign in to comment.
Something went wrong with that request. Please try again.