summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-03-12 15:12:42 +0100
committerKarolin Seeger <kseeger@samba.org>2014-07-15 12:46:12 +0200
commit484d746011be8c39e7a4827f555f3141e1ef5ea5 (patch)
tree70c1396e9f31c9e216df799bb1a103f97e4f9dbf /selftest
parentbe09c41307b94c5a7c5cfc08d618a01b63598fbf (diff)
downloadsamba-484d746011be8c39e7a4827f555f3141e1ef5ea5.tar.gz
selftest/subunithelper.py: correctly handle fail_immediately in end_testsuite of FilterOps
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)
Diffstat (limited to 'selftest')
-rw-r--r--selftest/subunithelper.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py
index 8b10016bb85..3f54d5ab92a 100644
--- 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,