From 81b55e0d8f49715bf91206a811181da6a5d1fa29 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 7 Jan 2021 17:09:44 +0100 Subject: [PATCH] tests: use wc -m to support BSD and macOS --- tests/run-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run-tests b/tests/run-tests index dce080a8..935ceb8e 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -1266,7 +1266,7 @@ if which wget; then mv $REPOROOT/index-v1.json repo/index-v1.json port=321${RANDOM:3} - test $(printf $port | wc --chars) -le 3 && port=52734 # when $RANDOM doesn't work + test $(printf $port | wc -m) -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=$!