summaryrefslogtreecommitdiff
path: root/selftest/format-subunit
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-09-14 03:47:04 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-09-14 10:54:28 +0200
commitdcadb90bd3d678e45fa84c2899ec23bf604bffa8 (patch)
tree86c54031e5bfd30473778c42663de39986c83cef /selftest/format-subunit
parent8e328c4e329221011a2f018c5c050dc6b642db70 (diff)
downloadsamba-dcadb90bd3d678e45fa84c2899ec23bf604bffa8.tar.gz
samba-dcadb90bd3d678e45fa84c2899ec23bf604bffa8.tar.bz2
samba-dcadb90bd3d678e45fa84c2899ec23bf604bffa8.zip
subunit: Use RemoteError when passing errors to upstream subunit.
Diffstat (limited to 'selftest/format-subunit')
-rwxr-xr-xselftest/format-subunit10
1 files changed, 7 insertions, 3 deletions
diff --git a/selftest/format-subunit b/selftest/format-subunit
index 43cdf096f2..0d16032afa 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]