run-tests: set attributes in sorted order
Python 3.8 preserves insertion order in serialized output
(https://bugs.python.org/issue34160). Older Pythons serialized
in sorted order.
Let's make insertion order sorted so behavior is consistent across
Python versions.
Differential Revision: https://phab.mercurial-scm.org/D5831
--- a/tests/run-tests.py Mon Feb 04 09:41:10 2019 -0800
+++ b/tests/run-tests.py Mon Feb 04 09:47:13 2019 -0800
@@ -2378,12 +2378,12 @@
timesd = dict((t[0], t[3]) for t in result.times)
doc = minidom.Document()
s = doc.createElement('testsuite')
- s.setAttribute('name', 'run-tests')
- s.setAttribute('tests', str(result.testsRun))
s.setAttribute('errors', "0") # TODO
s.setAttribute('failures', str(len(result.failures)))
+ s.setAttribute('name', 'run-tests')
s.setAttribute('skipped', str(len(result.skipped) +
len(result.ignored)))
+ s.setAttribute('tests', str(result.testsRun))
doc.appendChild(s)
for tc in result.successes:
t = doc.createElement('testcase')