1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-02 09:10:11 +02:00

tests: fix mirror test setup on macOS

I guess macOS has an ancient version of bash which does not include
support for $RANDOM
This commit is contained in:
Hans-Christoph Steiner 2020-12-14 20:33:28 +01:00
parent 50c98b2f30
commit ac3eb0e641

View File

@ -1265,7 +1265,8 @@ if which wget; then
$fdroid signindex
mv $REPOROOT/index-v1.json repo/index-v1.json
port=321${RANDOM:3}
port=3210${RANDOM:3}
test $(printf $port | wc --chars) -le 3 && port=52734 # when $RANDOM doesn't work
timeout 5m python3 -m http.server $port --bind 127.0.0.1 > $REPOROOT/http.server.log 2>&1 &
http_server_pid=$!