|
81 | 81 | * --skip (-s) Skip selected suites (multiple values allowed) |
82 | 82 | * --skip-group (-x) Skip selected groups (multiple values allowed) |
83 | 83 | * --env Run tests in selected environments. (multiple values allowed, environments can be merged with ',') |
84 | | - * --fail-fast (-f) Stop after first failure |
| 84 | + * --fail-fast (-f) Stop after nth failure (defaults to 1) |
85 | 85 | * --no-rebuild Do not rebuild actor classes on start |
86 | 86 | * --help (-h) Display this help message. |
87 | 87 | * --quiet (-q) Do not output any message. Almost the same as `--silent` |
@@ -213,7 +213,7 @@ protected function configure() |
213 | 213 | InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, |
214 | 214 | 'Run tests in selected environments.' |
215 | 215 | ), |
216 | | - new InputOption('fail-fast', 'f', InputOption::VALUE_NONE, 'Stop after first failure'), |
| 216 | + new InputOption('fail-fast', 'f', InputOption::VALUE_OPTIONAL, 'Stop after nth failure'), |
217 | 217 | new InputOption('no-rebuild', '', InputOption::VALUE_NONE, 'Do not rebuild actor classes on start'), |
218 | 218 | new InputOption( |
219 | 219 | 'seed', |
@@ -325,6 +325,10 @@ public function execute(InputInterface $input, OutputInterface $output) |
325 | 325 | if (!$userOptions['ansi'] && $input->getOption('colors')) { |
326 | 326 | $userOptions['colors'] = true; // turn on colors even in non-ansi mode if strictly passed |
327 | 327 | } |
| 328 | + // array key will exist if fail-fast option is used |
| 329 | + if (array_key_exists('fail-fast', $userOptions)) { |
| 330 | + $userOptions['fail-fast'] = (int) $this->options['fail-fast'] ?: 1; |
| 331 | + } |
328 | 332 |
|
329 | 333 | $suite = $input->getArgument('suite'); |
330 | 334 | $test = $input->getArgument('test'); |
|
0 commit comments