Mercurial > hg
changeset 44780:f727939f3513 stable
tests: use regular POSIX shell
wait-on-file requires one POSIX extension (sleep with non-integral
argument), but it doesn't require any bash extensions, so just require a
normal POSIX shell. While here, use consistent formatting without
redundant ;
Differential Revision: https://phab.mercurial-scm.org/D8500
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Thu, 07 May 2020 15:00:33 +0200 |
parents | b15a37d85dbe |
children | ed684a82e29b |
files | tests/testlib/wait-on-file |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/testlib/wait-on-file Thu May 07 10:15:19 2020 +0200 +++ b/tests/testlib/wait-on-file Thu May 07 15:00:33 2020 +0200 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # wait up to TIMEOUT seconds until a WAIT_ON_FILE is created. # @@ -22,13 +22,11 @@ create="$3" fi -if [ -n "$create" ]; -then +if [ -n "$create" ]; then touch "$create" create="" fi -while [ "$timer" -gt 0 ] && [ ! -f "$wait_on" ]; -do +while [ "$timer" -gt 0 ] && [ ! -f "$wait_on" ]; do timer=$(( $timer - 1)) sleep 0.01 done