tests: use wc -m to support BSD and macOS
This commit is contained in:
parent
16d3f89b5c
commit
81b55e0d8f
|
@ -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=$!
|
||||
|
||||
|
|
Loading…
Reference in New Issue