runtest: move slow timeout process earlier in the `_hghave` method
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 24 Feb 2019 19:56:08 +0100
changeset 41803 bc1c1435a874
parent 41802 7eb4e62d4760
child 41804 4cbccb50df46
runtest: move slow timeout process earlier in the `_hghave` method Before this changesets, early returns might prevent this logic to apply. It seem safer to run it sooner.
tests/run-tests.py
--- a/tests/run-tests.py	Sun Feb 24 19:56:34 2019 +0100
+++ b/tests/run-tests.py	Sun Feb 24 19:56:08 2019 +0100
@@ -1353,6 +1353,9 @@
 
     def _hghave(self, reqs):
         allreqs = b' '.join(reqs)
+
+        self._detectslow(reqs)
+
         if allreqs in self._have:
             return self._have.get(allreqs)
 
@@ -1374,8 +1377,6 @@
             self._have[allreqs] = (False, stdout)
             return False, stdout
 
-        self._detectslow(reqs)
-
         self._have[allreqs] = (True, None)
         return True, None