D12382: test: use `wait-on-file` in `test-racy-mutations.t`
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Mar 17 14:16:13 UTC 2022
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
The official utility scale its timeout with the run-tests.py one. So lets use
it.
REPOSITORY
rHG Mercurial
BRANCH
stable
REVISION DETAIL
https://phab.mercurial-scm.org/D12382
AFFECTED FILES
tests/test-racy-mutations.t
CHANGE DETAILS
diff --git a/tests/test-racy-mutations.t b/tests/test-racy-mutations.t
--- a/tests/test-racy-mutations.t
+++ b/tests/test-racy-mutations.t
@@ -14,14 +14,7 @@
> f="\${WAITLOCK_FILE}"
> start=\`date +%s\`
> timeout=5
- > while [ \\( ! -f \$f \\) -a \\( ! -L \$f \\) ]; do
- > now=\`date +%s\`
- > if [ "\`expr \$now - \$start\`" -gt \$timeout ]; then
- > echo "timeout: \$f was not created in \$timeout seconds (it is now \$(date +%s))"
- > exit 1
- > fi
- > sleep 0.1
- > done
+ > $RUNTESTDIR/testlib/wait-on-file "\$timeout" "\$f"
> if [ \$# -gt 1 ]; then
> cat "\$@"
> fi
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list