Patchwork [6,of,8,"STABLE] runtest: move slow timeout process earlier in the `_hghave` method

login
register
mail settings
Submitter Pierre-Yves David
Date Feb. 24, 2019, 7:42 p.m.
Message ID <5d72989993e27197311a.1551037365@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/38916/
State Accepted
Headers show

Comments

Pierre-Yves David - Feb. 24, 2019, 7:42 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1551034568 -3600
#      Sun Feb 24 19:56:08 2019 +0100
# Branch stable
# Node ID 5d72989993e27197311a11ef8981ed3253954b3a
# Parent  8cdce8eb1864523086cb3ddc686c1244db421910
# EXP-Topic test-sparse-revlog
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 5d72989993e2
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.

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1354,6 +1354,9 @@  class TTest(Test):
 
     def _hghave(self, reqs):
         allreqs = b' '.join(reqs)
+
+        self._detectslow(reqs)
+
         if allreqs in self._have:
             return self._have.get(allreqs)
 
@@ -1375,8 +1378,6 @@  class TTest(Test):
             self._have[allreqs] = (False, stdout)
             return False, stdout
 
-        self._detectslow(reqs)
-
         self._have[allreqs] = (True, None)
         return True, None