Show More
@@ -338,19 +338,25 b' class Test(unittest.TestCase):' | |||
|
338 | 338 | # Status code reserved for skipped tests (used by hghave). |
|
339 | 339 | SKIPPED_STATUS = 80 |
|
340 | 340 | |
|
341 |
def __init__(self, runner, |
|
|
342 | path = os.path.join(runner.testdir, test) | |
|
343 | errpath = os.path.join(runner.testdir, '%s.err' % test) | |
|
341 | def __init__(self, runner, path, count): | |
|
342 | """Create a test from parameters. | |
|
343 | ||
|
344 | runner is a TestRunner instance. | |
|
345 | ||
|
346 | path is the full path to the file defining the test. | |
|
344 | 347 |
|
|
345 | self.name = test | |
|
348 | count is an identifier used to denote this test instance. | |
|
349 | """ | |
|
350 | ||
|
351 | self._path = path | |
|
352 | self.name = os.path.basename(path) | |
|
353 | self._testdir = os.path.dirname(path) | |
|
354 | self._errpath = os.path.join(self._testdir, '%s.err' % self.name) | |
|
346 | 355 | |
|
347 | 356 | self._runner = runner |
|
348 | self._testdir = runner.testdir | |
|
349 | self._path = path | |
|
350 | 357 | self._options = runner.options |
|
351 | 358 | self._count = count |
|
352 | 359 | self._daemonpids = [] |
|
353 | self._errpath = errpath | |
|
354 | 360 | |
|
355 | 361 | self._finished = None |
|
356 | 362 | self._ret = None |
@@ -1461,7 +1467,7 b' class TestRunner(object):' | |||
|
1461 | 1467 | testcls = cls |
|
1462 | 1468 | break |
|
1463 | 1469 | |
|
1464 | return testcls(self, test, count) | |
|
1470 | return testcls(self, os.path.join(self.testdir, test), count) | |
|
1465 | 1471 | |
|
1466 | 1472 | def _cleanup(self): |
|
1467 | 1473 | """Clean up state from this test invocation.""" |
General Comments 0
You need to be logged in to leave comments.
Login now