diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-06-03 09:17:14 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-06-03 09:18:24 +0000 |
commit | 76420ca7b8c144ca86e110fa3d31bd71405755ad (patch) | |
tree | 1fd6940f1b62fc0e60e5cac4b6cbc297d8148a4f | |
parent | 30c13d69feced2e1744bd33a3a2454900be818b1 (diff) | |
download | aports-76420ca7b8c144ca86e110fa3d31bd71405755ad.tar.bz2 aports-76420ca7b8c144ca86e110fa3d31bd71405755ad.tar.xz |
main/hiredis: fix race when running tests
make sure socket exists before we start tests
-rw-r--r-- | main/hiredis/APKBUILD | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/hiredis/APKBUILD b/main/hiredis/APKBUILD index 84a2bc5ac7..5e9ef2b0c6 100644 --- a/main/hiredis/APKBUILD +++ b/main/hiredis/APKBUILD @@ -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 |