##// END OF EJS Templates
run-tests: pass a full test path into Test.__init__...
Gregory Szorc -
r21502:f8515564 default
parent child Browse files
Show More
@@ -338,19 +338,25 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, runner, test, count):
341 def __init__(self, runner, path, count):
342 path = os.path.join(runner.testdir, test)
342 """Create a test from parameters.
343 errpath = os.path.join(runner.testdir, '%s.err' % test)
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 self._runner = runner
356 self._runner = runner
348 self._testdir = runner.testdir
349 self._path = path
350 self._options = runner.options
357 self._options = runner.options
351 self._count = count
358 self._count = count
352 self._daemonpids = []
359 self._daemonpids = []
353 self._errpath = errpath
354
360
355 self._finished = None
361 self._finished = None
356 self._ret = None
362 self._ret = None
@@ -1461,7 +1467,7 b' class TestRunner(object):'
1461 testcls = cls
1467 testcls = cls
1462 break
1468 break
1463
1469
1464 return testcls(self, test, count)
1470 return testcls(self, os.path.join(self.testdir, test), count)
1465
1471
1466 def _cleanup(self):
1472 def _cleanup(self):
1467 """Clean up state from this test invocation."""
1473 """Clean up state from this test invocation."""
General Comments 0
You need to be logged in to leave comments. Login now