tests/run-tests.py
changeset 41803 bc1c1435a874
parent 41802 7eb4e62d4760
child 41804 4cbccb50df46
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):