diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -2061,6 +2061,17 @@ class TextTestRunner(unittest.TextTestRu failelem.appendChild(cd) t.appendChild(failelem) s.appendChild(t) + for tc, message in result.skipped: + # According to the schema, 'skipped' has no attributes. So store + # the skip message as a text node instead. + t = doc.createElement('testcase') + t.setAttribute('name', tc.name) + message = cdatasafe(message).decode('utf-8', 'replace') + cd = doc.createCDATASection(message) + skipelem = doc.createElement('skipped') + skipelem.appendChild(cd) + t.appendChild(skipelem) + s.appendChild(t) outf.write(doc.toprettyxml(indent=' ', encoding='utf-8')) @staticmethod diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t --- a/tests/test-run-tests.t +++ b/tests/test-run-tests.t @@ -676,6 +676,10 @@ Skips with xml (glob) + + + + Missing skips or blacklisted skips don't count as executed: