From ac3eb0e6410f53963578ea050879dbc7c59c9cdd Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 14 Dec 2020 20:33:28 +0100 Subject: [PATCH] tests: fix mirror test setup on macOS I guess macOS has an ancient version of bash which does not include support for $RANDOM --- tests/run-tests | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/run-tests b/tests/run-tests index 4ed91217..1a489fef 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -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=$!