Show More
@@ -338,10 +338,10 b' class Test(unittest.TestCase):' | |||||
338 | # Status code reserved for skipped tests (used by hghave). |
|
338 | # Status code reserved for skipped tests (used by hghave). | |
339 | SKIPPED_STATUS = 80 |
|
339 | SKIPPED_STATUS = 80 | |
340 |
|
340 | |||
341 |
def __init__(self, |
|
341 | def __init__(self, options, path, count, tmpdir, abort): | |
342 | """Create a test from parameters. |
|
342 | """Create a test from parameters. | |
343 |
|
343 | |||
344 | runner is a TestRunner instance. |
|
344 | options are parsed command line options that control test execution. | |
345 |
|
345 | |||
346 | path is the full path to the file defining the test. |
|
346 | path is the full path to the file defining the test. | |
347 |
|
347 | |||
@@ -358,8 +358,7 b' class Test(unittest.TestCase):' | |||||
358 | self._testdir = os.path.dirname(path) |
|
358 | self._testdir = os.path.dirname(path) | |
359 | self._errpath = os.path.join(self._testdir, '%s.err' % self.name) |
|
359 | self._errpath = os.path.join(self._testdir, '%s.err' % self.name) | |
360 |
|
360 | |||
361 |
self._ |
|
361 | self._options = options | |
362 | self._options = runner.options |
|
|||
363 | self._count = count |
|
362 | self._count = count | |
364 | self._threadtmp = tmpdir |
|
363 | self._threadtmp = tmpdir | |
365 | self._abort = abort |
|
364 | self._abort = abort | |
@@ -373,7 +372,7 b' class Test(unittest.TestCase):' | |||||
373 |
|
372 | |||
374 | # If we're not in --debug mode and reference output file exists, |
|
373 | # If we're not in --debug mode and reference output file exists, | |
375 | # check test output against it. |
|
374 | # check test output against it. | |
376 |
if |
|
375 | if options.debug: | |
377 | self._refout = None # to match "out is None" |
|
376 | self._refout = None # to match "out is None" | |
378 | elif os.path.exists(self._refpath): |
|
377 | elif os.path.exists(self._refpath): | |
379 | f = open(self._refpath, 'r') |
|
378 | f = open(self._refpath, 'r') | |
@@ -1475,7 +1474,7 b' class TestRunner(object):' | |||||
1475 | refpath = os.path.join(self.testdir, test) |
|
1474 | refpath = os.path.join(self.testdir, test) | |
1476 | tmpdir = os.path.join(self.hgtmp, 'child%d' % count) |
|
1475 | tmpdir = os.path.join(self.hgtmp, 'child%d' % count) | |
1477 |
|
1476 | |||
1478 | return testcls(self, refpath, count, tmpdir, self.abort) |
|
1477 | return testcls(self.options, refpath, count, tmpdir, self.abort) | |
1479 |
|
1478 | |||
1480 | def _cleanup(self): |
|
1479 | def _cleanup(self): | |
1481 | """Clean up state from this test invocation.""" |
|
1480 | """Clean up state from this test invocation.""" |
General Comments 0
You need to be logged in to leave comments.
Login now