git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eef4181
)
selftest/subunithelper.py: correctly handle fail_immediately in end_testsuite of...
author
Stefan Metzmacher
<metze@samba.org>
Wed, 12 Mar 2014 14:12:42 +0000
(15:12 +0100)
committer
Karolin Seeger
<kseeger@samba.org>
Sun, 13 Jul 2014 19:29:19 +0000
(21:29 +0200)
This way --fail-immediately also works if a command segfaults.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
fee156f5b9235b5f766cb773433ddb7d0ccd98a1
)
selftest/subunithelper.py
patch
|
blob
|
history
diff --git
a/selftest/subunithelper.py
b/selftest/subunithelper.py
index 8b10016bb85a4af211e421043ac300b84d0924f9..3f54d5ab92a24ba2cbd23e32279f5ff54df18a61 100644
(file)
--- a/
selftest/subunithelper.py
+++ b/
selftest/subunithelper.py
@@
-393,6
+393,12
@@
class FilterOps(testtools.testresult.TestResult):
reason += "\n errors[%d]" % self.error_added
self._ops.end_testsuite(name, result, reason)
+ if result not in ("success", "xfail"):
+ if self.output:
+ self._ops.output_msg(self.output)
+ if self.fail_immediately:
+ raise ImmediateFail()
+ self.output = None
def __init__(self, out, prefix=None, suffix=None, expected_failures=None,
strip_ok_output=False, fail_immediately=False,