diff options
Diffstat (limited to 'yarn')
-rwxr-xr-x | yarn | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -19,6 +19,7 @@ import cliapp import collections +import functools import logging import os import re @@ -94,6 +95,12 @@ class YarnRunner(cliapp.Application): 'allow scenarios to reference steps that do not exist, ' 'by warning about them, but otherwise ignoring the scenarios') + self.settings.integer( + ['max-jobs', 'j'], + 'run as many as JOBS scenarios in parallel', + default=1, + metavar='JOBS') + def info(self, msg): if self.settings['verbose']: logging.info(msg) @@ -155,6 +162,9 @@ class YarnRunner(cliapp.Application): if self.settings['no-act']: runner_class = dry_scenario_runner_factory(self.info, self.ts) + elif self.settings['max-jobs'] > 1: + runner_class = functools.partial(yarnlib.ScenarioMultiRunner, + max_jobs=self.settings['max-jobs']) else: runner_class = yarnlib.ScenarioRunner scenario_runner = runner_class(shell_prelude, os.getcwd(), |