Mercurial > hg
comparison tests/run-tests.py @ 41803:bc1c1435a874
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.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 24 Feb 2019 19:56:08 +0100 |
parents | 7eb4e62d4760 |
children | 4cbccb50df46 |
comparison
equal
deleted
inserted
replaced
41802:7eb4e62d4760 | 41803:bc1c1435a874 |
---|---|
1351 | 1351 |
1352 return self._processoutput(exitcode, output, salt, after, expected) | 1352 return self._processoutput(exitcode, output, salt, after, expected) |
1353 | 1353 |
1354 def _hghave(self, reqs): | 1354 def _hghave(self, reqs): |
1355 allreqs = b' '.join(reqs) | 1355 allreqs = b' '.join(reqs) |
1356 | |
1357 self._detectslow(reqs) | |
1358 | |
1356 if allreqs in self._have: | 1359 if allreqs in self._have: |
1357 return self._have.get(allreqs) | 1360 return self._have.get(allreqs) |
1358 | 1361 |
1359 # TODO do something smarter when all other uses of hghave are gone. | 1362 # TODO do something smarter when all other uses of hghave are gone. |
1360 runtestdir = os.path.abspath(os.path.dirname(_bytespath(__file__))) | 1363 runtestdir = os.path.abspath(os.path.dirname(_bytespath(__file__))) |
1371 sys.exit(1) | 1374 sys.exit(1) |
1372 | 1375 |
1373 if ret != 0: | 1376 if ret != 0: |
1374 self._have[allreqs] = (False, stdout) | 1377 self._have[allreqs] = (False, stdout) |
1375 return False, stdout | 1378 return False, stdout |
1376 | |
1377 self._detectslow(reqs) | |
1378 | 1379 |
1379 self._have[allreqs] = (True, None) | 1380 self._have[allreqs] = (True, None) |
1380 return True, None | 1381 return True, None |
1381 | 1382 |
1382 def _detectslow(self, reqs): | 1383 def _detectslow(self, reqs): |