##// END OF EJS Templates
testlib: adjust wait-on-file timeout according to the global test timeout...
marmoute -
r45122:82543879 default
parent child Browse files
Show More
@@ -321,7 +321,7 b" IMPL_PATH = b'PYTHONPATH'"
321 321 if 'java' in sys.platform:
322 322 IMPL_PATH = b'JYTHONPATH'
323 323
324 defaults = {
324 default_defaults = {
325 325 'jobs': ('HGTEST_JOBS', multiprocessing.cpu_count()),
326 326 'timeout': ('HGTEST_TIMEOUT', 180),
327 327 'slowtimeout': ('HGTEST_SLOWTIMEOUT', 1500),
@@ -329,6 +329,8 b' defaults = {'
329 329 'shell': ('HGTEST_SHELL', 'sh'),
330 330 }
331 331
332 defaults = default_defaults.copy()
333
332 334
333 335 def canonpath(path):
334 336 return os.path.realpath(os.path.expanduser(path))
@@ -1327,6 +1329,9 b' class Test(unittest.TestCase):'
1327 1329 env['TESTTMP'] = _bytes2sys(self._testtmp)
1328 1330 env['TESTNAME'] = self.name
1329 1331 env['HOME'] = _bytes2sys(self._testtmp)
1332 formated_timeout = _bytes2sys(b"%d" % default_defaults['timeout'][1])
1333 env['HGTEST_TIMEOUT_DEFAULT'] = formated_timeout
1334 env['HGTEST_TIMEOUT'] = _bytes2sys(b"%d" % self._timeout)
1330 1335 # This number should match portneeded in _getport
1331 1336 for port in xrange(3):
1332 1337 # This list should be parallel to _portmap in _getreplacements
@@ -10,6 +10,12 b' if [ $# -lt 2 ] || [ $# -gt 3 ]; then'
10 10 fi
11 11
12 12 timer="$1"
13
14 # if the test timeout have been extended, explicitly extend the provided timer
15 if [ "$HGTEST_TIMEOUT_DEFAULT" -lt "$HGTEST_TIMEOUT" ]; then
16 timer=$(( ("$timer" * "$HGTEST_TIMEOUT") / $HGTEST_TIMEOUT_DEFAULT ))
17 fi
18
13 19 wait_on="$2"
14 20 create=""
15 21 if [ $# -eq 3 ]; then
General Comments 0
You need to be logged in to leave comments. Login now