Show More
@@ -321,7 +321,7 b" IMPL_PATH = b'PYTHONPATH'" | |||||
321 | if 'java' in sys.platform: |
|
321 | if 'java' in sys.platform: | |
322 | IMPL_PATH = b'JYTHONPATH' |
|
322 | IMPL_PATH = b'JYTHONPATH' | |
323 |
|
323 | |||
324 | defaults = { |
|
324 | default_defaults = { | |
325 | 'jobs': ('HGTEST_JOBS', multiprocessing.cpu_count()), |
|
325 | 'jobs': ('HGTEST_JOBS', multiprocessing.cpu_count()), | |
326 | 'timeout': ('HGTEST_TIMEOUT', 180), |
|
326 | 'timeout': ('HGTEST_TIMEOUT', 180), | |
327 | 'slowtimeout': ('HGTEST_SLOWTIMEOUT', 1500), |
|
327 | 'slowtimeout': ('HGTEST_SLOWTIMEOUT', 1500), | |
@@ -329,6 +329,8 b' defaults = {' | |||||
329 | 'shell': ('HGTEST_SHELL', 'sh'), |
|
329 | 'shell': ('HGTEST_SHELL', 'sh'), | |
330 | } |
|
330 | } | |
331 |
|
331 | |||
|
332 | defaults = default_defaults.copy() | |||
|
333 | ||||
332 |
|
334 | |||
333 | def canonpath(path): |
|
335 | def canonpath(path): | |
334 | return os.path.realpath(os.path.expanduser(path)) |
|
336 | return os.path.realpath(os.path.expanduser(path)) | |
@@ -1327,6 +1329,9 b' class Test(unittest.TestCase):' | |||||
1327 | env['TESTTMP'] = _bytes2sys(self._testtmp) |
|
1329 | env['TESTTMP'] = _bytes2sys(self._testtmp) | |
1328 | env['TESTNAME'] = self.name |
|
1330 | env['TESTNAME'] = self.name | |
1329 | env['HOME'] = _bytes2sys(self._testtmp) |
|
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 | # This number should match portneeded in _getport |
|
1335 | # This number should match portneeded in _getport | |
1331 | for port in xrange(3): |
|
1336 | for port in xrange(3): | |
1332 | # This list should be parallel to _portmap in _getreplacements |
|
1337 | # This list should be parallel to _portmap in _getreplacements |
@@ -10,6 +10,12 b' if [ $# -lt 2 ] || [ $# -gt 3 ]; then' | |||||
10 | fi |
|
10 | fi | |
11 |
|
11 | |||
12 | timer="$1" |
|
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 | wait_on="$2" |
|
19 | wait_on="$2" | |
14 | create="" |
|
20 | create="" | |
15 | if [ $# -eq 3 ]; then |
|
21 | if [ $# -eq 3 ]; then |
General Comments 0
You need to be logged in to leave comments.
Login now