summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 514fc98..ef076a2 100644
--- a/Makefile
+++ b/Makefile
@@ -105,6 +105,12 @@ hiredis-%: %.o $(STLIBNAME)
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`
+
.c.o:
$(CC) -std=c99 -pedantic -c $(CFLAGS) $(OBJARCH) $(DEBUG) $(COMPILE_TIME) $<