Commit 76420ca7 authored by Natanael Copa's avatar Natanael Copa

main/hiredis: fix race when running tests

make sure socket exists before we start tests
parent 30c13d69
......@@ -23,6 +23,13 @@ check() {
redis-server --dir "$builddir" --unixsocket "$builddir"/redis.sock&
local _redispid=$!
# make sure socket is available before we start running tests
local _n=100 # wait up to 10 sec
while ! [ -e "$builddir"/redis.sock ] && [ $_n -gt 0 ]; do
sleep 0.1s
_n=$(( $_n - 1))
done
make hiredis-test
./hiredis-test -s "$builddir"/redis.sock || (kill $_redispid && false)
kill $_redispid
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment