##// END OF EJS Templates
run-tests: make testdir an argument of TestSuite.__init__...
Gregory Szorc -
r21533:aecac805 default
parent child Browse files
Show More
@@ -1153,11 +1153,15 b' class TestResult(unittest._TextTestResul'
1153 1153 class TestSuite(unittest.TestSuite):
1154 1154 """Custom unitest TestSuite that knows how to execute Mercurial tests."""
1155 1155
1156 def __init__(self, runner, jobs=1, whitelist=None, blacklist=None,
1156 def __init__(self, testdir, jobs=1, whitelist=None, blacklist=None,
1157 1157 retest=False, keywords=None, loop=False,
1158 1158 *args, **kwargs):
1159 1159 """Create a new instance that can run tests with a configuration.
1160 1160
1161 testdir specifies the directory where tests are executed from. This
1162 is typically the ``tests`` directory from Mercurial's source
1163 repository.
1164
1161 1165 jobs specifies the number of jobs to run concurrently. Each test
1162 1166 executes on its own thread. Tests actually spawn new processes, so
1163 1167 state mutation should not be an issue.
@@ -1179,7 +1183,6 b' class TestSuite(unittest.TestSuite):'
1179 1183 """
1180 1184 super(TestSuite, self).__init__(*args, **kwargs)
1181 1185
1182 self._runner = runner
1183 1186 self._jobs = jobs
1184 1187 self._whitelist = whitelist
1185 1188 self._blacklist = blacklist
@@ -1509,7 +1512,8 b' class TestRunner(object):'
1509 1512 failed = False
1510 1513 warned = False
1511 1514
1512 suite = TestSuite(self, jobs=self.options.jobs,
1515 suite = TestSuite(self.testdir,
1516 jobs=self.options.jobs,
1513 1517 whitelist=self.options.whitelisted,
1514 1518 blacklist=self.options.blacklist,
1515 1519 retest=self.options.retest,
General Comments 0
You need to be logged in to leave comments. Login now