diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-09-14 03:47:04 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-09-14 10:54:28 +0200 |
commit | dcadb90bd3d678e45fa84c2899ec23bf604bffa8 (patch) | |
tree | 86c54031e5bfd30473778c42663de39986c83cef /selftest/format-subunit | |
parent | 8e328c4e329221011a2f018c5c050dc6b642db70 (diff) | |
download | samba-dcadb90bd3d678e45fa84c2899ec23bf604bffa8.tar.gz |
subunit: Use RemoteError when passing errors to upstream subunit.
Diffstat (limited to 'selftest/format-subunit')
-rwxr-xr-x | selftest/format-subunit | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/selftest/format-subunit b/selftest/format-subunit index 43cdf096f2f..0d16032afa6 100755 --- a/selftest/format-subunit +++ b/selftest/format-subunit @@ -32,6 +32,7 @@ class PlainFormatter(subunithelper.TestsuiteEnabledTestResult): def __init__(self, summaryfile, verbose, immediate, statistics, totaltests=None): + super(PlainFormatter, self).__init__() self.verbose = verbose self.immediate = immediate self.statistics = statistics @@ -124,8 +125,8 @@ class PlainFormatter(subunithelper.TestsuiteEnabledTestResult): def startTest(self, test): pass - def addSuccess(self, test, details=None): - self.end_test(test.id(), "success", False, details) + def addSuccess(self, test): + self.end_test(test.id(), "success", False) def addError(self, test, details=None): self.end_test(test.id(), "error", True, details) @@ -150,9 +151,12 @@ class PlainFormatter(subunithelper.TestsuiteEnabledTestResult): 'success': '.'}.get(result, "?(%s)" % result)) return + if not self.name in self.test_output: + self.test_output[self.name] = "" + self.test_output[self.name] += "UNEXPECTED(%s): %s\n" % (result, testname) if reason is not None: - self.test_output[self.name] += "REASON: %s\n" % (reason.strip(),) + self.test_output[self.name] += "REASON: %s\n" % (reason[1].message.encode("utf-8").strip(),) if self.immediate and not self.verbose: print self.test_output[self.name] |