summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPiotr Sikora <piotr.sikora@frickle.com>2011-04-13 05:45:08 +0000
committerPieter Noordhuis <pcnoordhuis@gmail.com>2011-05-22 15:24:11 +0200
commit5793b999a956806f886879fb475e19edd5a98b72 (patch)
tree0544750ca71569284d90dc7b2bcf83a26281e8aa /Makefile
parent875a20939932045ccae4fc6a67db7c26d94f658d (diff)
Add "make check" target (useful for automated tests).
While there, add "-p" option to "hiredis-test", so that we could run tests without interrupting Redis instance running on the default port.
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) $<