summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-02-15 22:49:39 +0200
committerLars Wirzenius <liw@liw.fi>2016-02-15 22:49:39 +0200
commit236c8a541f02e2a7594f0c18503550228f28af29 (patch)
tree59b1cb409c06129c614cd4dc6e4a5fbe45fa35d9
parent34496ac2e519e41750b0140a92dd36d54e010a95 (diff)
downloadcmdtest-236c8a541f02e2a7594f0c18503550228f28af29.tar.gz
Add yarn --stop-on-first-fail
-rw-r--r--NEWS6
-rwxr-xr-xyarn6
2 files changed, 12 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 52d1d15..ca4c92a 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,12 @@ NEWS for cmdtest
This file summarizes changes between releases of cmdtest.
+Version 0.22+git, not yet released
+---------------------------------
+
+* Yarn now has the `--stop-on-first-fail` setting, which makes it stop
+ if a scenario step fails, and not continue with the next scenario.
+
Version 0.22, released 2016-02-04
---------------------------------
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']: