From 236c8a541f02e2a7594f0c18503550228f28af29 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 15 Feb 2016 22:49:39 +0200 Subject: Add yarn --stop-on-first-fail --- yarn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'yarn') diff --git a/yarn b/yarn index 2e336b0..7e492b4 100755 --- a/yarn +++ b/yarn @@ -106,6 +106,10 @@ class YarnRunner(cliapp.Application): 'change to DATADIR when running commands', default=False) + self.settings.boolean( + ['stop-on-first-fail'], + "stop if any scenario step fails, don't run more scenarios") + def stdout(self, msg): self._write(sys.stdout, msg) @@ -177,6 +181,8 @@ class YarnRunner(cliapp.Application): for scenario in self.select_scenarios(scenarios): if not self.run_scenario(scenario, shell_prelude): failed_scenarios.append(scenario) + if self.settings['stop-on-first-fail']: + break duration = time.time() - start_time if not self.settings['quiet']: -- cgit v1.2.1