From af4722c8b69b2ecf1a2085ef1650c61ca57a104a Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 13 Oct 2019 20:29:16 +0200 Subject: fix redis don't symlink redis binaries if they already exist. Make shutdown_cmd work atexit by using its abspath. --- src/benchmarks/redis.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/benchmarks/redis.py') diff --git a/src/benchmarks/redis.py b/src/benchmarks/redis.py index 80bd244..2987d34 100644 --- a/src/benchmarks/redis.py +++ b/src/benchmarks/redis.py @@ -44,7 +44,7 @@ class BenchmarkRedis(Benchmark): self.cmd = "redis-benchmark 1000000 -n 1000000 -P 8 -q lpush a 1 2 3 4 5 6 7 8 9 10 lrange a 1 10" self.servers = [{"name": "redis", "cmd": "redis-server", - "shutdown_cmds": ["redis-cli shutdown"]}] + "shutdown_cmds": ["{build_dir}/redis-cli shutdown"]}] super().__init__(name) @@ -71,7 +71,8 @@ class BenchmarkRedis(Benchmark): for exe in ["redis-cli", "redis-server", "redis-benchmark"]: src = os.path.join(redis_dir, "src", exe) dest = os.path.join(self.build_dir, exe) - os.link(src, dest) + if not os.path.exists(dest): + os.link(src, dest) @staticmethod def process_output(result, stdout, stderr, allocator, perm): -- cgit v1.2.3