Skip to content
Snippets Groups Projects
Commit 76420ca7 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/hiredis: fix race when running tests

make sure socket exists before we start tests
parent 30c13d69
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,13 @@ check() { ...@@ -23,6 +23,13 @@ check() {
redis-server --dir "$builddir" --unixsocket "$builddir"/redis.sock& redis-server --dir "$builddir" --unixsocket "$builddir"/redis.sock&
local _redispid=$! 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 make hiredis-test
./hiredis-test -s "$builddir"/redis.sock || (kill $_redispid && false) ./hiredis-test -s "$builddir"/redis.sock || (kill $_redispid && false)
kill $_redispid kill $_redispid
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment