1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

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>
This commit is contained in:
Stefan Metzmacher 2014-03-12 15:12:42 +01:00 committed by Jeremy Allison
parent 14246953b2
commit fee156f5b9

View File

@ -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,