Show More
@@ -162,19 +162,18 b' class PyTestController(TestController):' | |||||
162 | self.cmd[2] = self.pycmd |
|
162 | self.cmd[2] = self.pycmd | |
163 | super(PyTestController, self).launch() |
|
163 | super(PyTestController, self).launch() | |
164 |
|
164 | |||
165 |
|
165 | def prepare_controllers(testgroups=None, inc_slow=False): | ||
166 | def prepare_py_test_controllers(inc_slow=False): |
|
166 | """Returns two lists of TestController instances, those to run, and those | |
167 | """Returns an ordered list of PyTestController instances to be run.""" |
|
167 | not to run.""" | |
168 | to_run, not_run = [], [] |
|
168 | if not testgroups: | |
169 | if not inc_slow: |
|
169 | testgroups = test_group_names | |
170 | test_sections['parallel'].enabled = False |
|
170 | if not inc_slow: | |
171 |
|
171 | test_sections['parallel'].enabled = False | ||
172 | for name in test_group_names: |
|
172 | ||
173 |
|
|
173 | controllers = [PyTestController(name) for name in testgroups] | |
174 | if controller.will_run: |
|
174 | ||
175 | to_run.append(controller) |
|
175 | to_run = [c for c in controllers if c.will_run] | |
176 | else: |
|
176 | not_run = [c for c in controllers if not c.will_run] | |
177 | not_run.append(controller) |
|
|||
178 | return to_run, not_run |
|
177 | return to_run, not_run | |
179 |
|
178 | |||
180 | def configure_controllers(controllers, xunit=False, coverage=False, extra_args=()): |
|
179 | def configure_controllers(controllers, xunit=False, coverage=False, extra_args=()): | |
@@ -268,11 +267,7 b' def run_iptestall(options):' | |||||
268 | # If running in parallel, capture output so it doesn't get interleaved |
|
267 | # If running in parallel, capture output so it doesn't get interleaved | |
269 | TestController.buffer_output = True |
|
268 | TestController.buffer_output = True | |
270 |
|
269 | |||
271 | if options.testgroups: |
|
270 | to_run, not_run = prepare_controllers(options.testgroups, inc_slow=options.all) | |
272 | to_run = [PyTestController(name) for name in options.testgroups] |
|
|||
273 | not_run = [] |
|
|||
274 | else: |
|
|||
275 | to_run, not_run = prepare_py_test_controllers(inc_slow=options.all) |
|
|||
276 |
|
271 | |||
277 | configure_controllers(to_run, xunit=options.xunit, coverage=options.coverage, |
|
272 | configure_controllers(to_run, xunit=options.xunit, coverage=options.coverage, | |
278 | extra_args=options.extra_args) |
|
273 | extra_args=options.extra_args) |
General Comments 0
You need to be logged in to leave comments.
Login now