Put results.xml failure text in own child attribute (
bug 1269458); r=gps
MozReview-Commit-ID: E9mW8F7Nu9Q
--- a/pylib/mercurial-support/run-tests.py
+++ b/pylib/mercurial-support/run-tests.py
@@ -1740,17 +1740,20 @@ class TextTestRunner(unittest.TextTestRu
t = doc.createElement('testcase')
t.setAttribute('name', tc)
t.setAttribute('time', '%.3f' % timesd[tc])
# createCDATASection expects a unicode or it will
# convert using default conversion rules, which will
# fail if string isn't ASCII.
err = cdatasafe(err).decode('utf-8', 'replace')
cd = doc.createCDATASection(err)
- t.appendChild(cd)
+ f = doc.createElement('failure')
+ f.setAttribute('message', 'test failure')
+ f.appendChild(cd)
+ t.appendChild(f)
s.appendChild(t)
xuf.write(doc.toprettyxml(indent=' ', encoding='utf-8'))
if self._runner.options.json:
jsonpath = os.path.join(self._runner._testdir, b'report.json')
with open(jsonpath, 'w') as fp:
timesd = {}
for tdata in result.times: