summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2011-05-22 16:35:20 +0200
committerPieter Noordhuis <pcnoordhuis@gmail.com>2011-05-22 16:35:20 +0200
commit82ad944412419c6ae946f11e7d9760a584c1c1cd (patch)
treed72b93a313e578f215b617082520e03955af6f58
parent9723a4fc466e5df387798f73a5da1d804f7ea52e (diff)
Test against unix socket connection in make check target
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ef076a2..f8e5cca 100644
--- a/Makefile
+++ b/Makefile
@@ -106,10 +106,15 @@ test: hiredis-test
./hiredis-test
check: hiredis-test
- echo "daemonize yes\n pidfile /tmp/redis-check.pid\n port 56379" \
- | redis-server -
- ./hiredis-test -p 56379 || (kill `cat /tmp/redis-check.pid` && false)
- kill `cat /tmp/redis-check.pid`
+ echo \
+ "daemonize yes\n" \
+ "pidfile /tmp/hiredis-test-redis.pid\n" \
+ "port 56379\n" \
+ "bind 127.0.0.1\n" \
+ "unixsocket /tmp/hiredis-test-redis.sock" \
+ | redis-server -
+ ./hiredis-test -h 127.0.0.1 -p 56379 -s /tmp/hiredis-test-redis.sock || true
+ kill `cat /tmp/hiredis-test-redis.pid`
.c.o:
$(CC) -std=c99 -pedantic -c $(CFLAGS) $(OBJARCH) $(DEBUG) $(COMPILE_TIME) $<