[Request] [+ ] D8500: tests: use regular POSIX shell
joerg.sonnenberger (Joerg Sonnenberger)
phabricator at mercurial-scm.org
Thu May 7 13:03:02 UTC 2020
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
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 ;
REPOSITORY
rHG Mercurial
BRANCH
stable
REVISION DETAIL
https://phab.mercurial-scm.org/D8500
AFFECTED FILES
tests/testlib/wait-on-file
CHANGE DETAILS
diff --git a/tests/testlib/wait-on-file b/tests/testlib/wait-on-file
--- a/tests/testlib/wait-on-file
+++ b/tests/testlib/wait-on-file
@@ -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
To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200507/4581ac73/attachment.html>
More information about the Mercurial-patches
mailing list