summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-10-20 21:47:09 +0300
committerLars Wirzenius <liw@liw.fi>2015-10-20 21:48:05 +0300
commit04897accb445f3ae1883b6b31ecefdef9a81ba70 (patch)
treeae03ed9d6b683416a751f34fd37d410946732bd3
parent9a2f1f2fbce31e5a85585a08ec8d3924e89c7c8b (diff)
downloadcmdtest-04897accb445f3ae1883b6b31ecefdef9a81ba70.tar.gz
Add --require-assumptions
-rw-r--r--NEWS3
-rwxr-xr-xyarn9
2 files changed, 11 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 369087b..57d2f52 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,9 @@ Version 0.17, released UNRELEASED
yarn output, such as CI systems, and get the timings differently
from what would happen on a terminal.
+* The `--require-assumptions` option has been added to tell Yarn to
+ treat failing ASSUMPTIONS steps as errors.
+
Version 0.16, released 2015-06-30
---------------------------------
diff --git a/yarn b/yarn
index 02bec29..fdfc695 100755
--- a/yarn
+++ b/yarn
@@ -84,6 +84,10 @@ class YarnRunner(cliapp.Application):
'allow scenarios to reference steps that do not exist, '
'by warning about them, but otherwise ignoring the scenarios')
+ self.settings.boolean(
+ ['require-assumptions'],
+ 'require ASSUMING to always pass')
+
def stdout(self, msg):
self.output.write(msg)
self.output.flush()
@@ -338,7 +342,10 @@ class YarnRunner(cliapp.Application):
step_number += 1
self.snapshot_datadir(
tempdir, datadir, scenario, step_number, step)
- if exit != 0:
+ if self.settings['require-assumptions'] and exit != 0:
+ ok = False
+ break
+ elif exit != 0:
self.ts.notify(
'Skipping "%s" because "%s %s" failed' %
(scenario.name, step.what, step.text))