diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-03-12 15:12:42 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-03-13 21:45:13 +0100 |
commit | fee156f5b9235b5f766cb773433ddb7d0ccd98a1 (patch) | |
tree | 4f70a9a1c6771e42660f2a901949909da35a45df /selftest | |
parent | 14246953b2e91578e5f51faedfdf31926a5b1950 (diff) | |
download | samba-fee156f5b9235b5f766cb773433ddb7d0ccd98a1.tar.gz samba-fee156f5b9235b5f766cb773433ddb7d0ccd98a1.tar.xz samba-fee156f5b9235b5f766cb773433ddb7d0ccd98a1.zip |
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>
Diffstat (limited to 'selftest')
-rw-r--r-- | selftest/subunithelper.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py index 8b10016bb8..3f54d5ab92 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, |