D10937: testing: fix _timeout_factor
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Jul 2 22:36:50 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
With `--debug`, `run-tests.py` set the timeout to 0... that breaks the logic in
`mercurial.testing`.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10937
AFFECTED FILES
mercurial/testing/__init__.py
CHANGE DETAILS
diff --git a/mercurial/testing/__init__.py b/mercurial/testing/__init__.py
--- a/mercurial/testing/__init__.py
+++ b/mercurial/testing/__init__.py
@@ -16,8 +16,10 @@
def _timeout_factor():
"""return the current modification to timeout"""
- default = int(environ.get('HGTEST_TIMEOUT_DEFAULT', 1))
+ default = int(environ.get('HGTEST_TIMEOUT_DEFAULT', 360))
current = int(environ.get('HGTEST_TIMEOUT', default))
+ if current == 0:
+ return 1
return current / float(default)
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list