From 5793b999a956806f886879fb475e19edd5a98b72 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Wed, 13 Apr 2011 05:45:08 +0000 Subject: 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. --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Makefile') 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) $< -- cgit v1.2.3