Skip to content

Commit

Permalink
Test against unix socket connection in make check target
Browse files Browse the repository at this point in the history
  • Loading branch information
pietern committed May 22, 2011
1 parent 9723a4f commit 82ad944
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) $<
Expand Down

0 comments on commit 82ad944

Please sign in to comment.