run-tests: sort the skip, failure and error lists in the final output
This will help keep the lists consistent, for comparison across runs.
--- a/tests/run-tests.py Wed Jan 30 17:07:58 2019 -0800
+++ b/tests/run-tests.py Wed Jan 30 19:20:31 2019 -0500
@@ -2258,14 +2258,17 @@
self.stream.writeln('')
if not self._runner.options.noskips:
- for test, msg in self._result.skipped:
+ for test, msg in sorted(self._result.skipped,
+ key=lambda s: s[0].name):
formatted = 'Skipped %s: %s\n' % (test.name, msg)
msg = highlightmsg(formatted, self._result.color)
self.stream.write(msg)
- for test, msg in self._result.failures:
+ for test, msg in sorted(self._result.failures,
+ key=lambda f: f[0].name):
formatted = 'Failed %s: %s\n' % (test.name, msg)
self.stream.write(highlightmsg(formatted, self._result.color))
- for test, msg in self._result.errors:
+ for test, msg in sorted(self._result.errors,
+ key=lambda e: e[0].name):
self.stream.writeln('Errored %s: %s' % (test.name, msg))
if self._runner.options.xunit:
--- a/tests/test-run-tests.t Wed Jan 30 17:07:58 2019 -0800
+++ b/tests/test-run-tests.t Wed Jan 30 19:20:31 2019 -0500
@@ -324,8 +324,8 @@
ERROR: test-failure-unicode.t output changed
!
+ Failed test-failure-unicode.t: output changed
Failed test-failure.t: output changed
- Failed test-failure-unicode.t: output changed
# Ran 3 tests, 0 skipped, 2 failed.
python hash seed: * (glob)
[1]
@@ -356,8 +356,8 @@
ERROR: test-failure-unicode.t output changed
!
+ Failed test-failure-unicode.t: output changed
Failed test-failure.t: output changed
- Failed test-failure-unicode.t: output changed
# Ran 3 tests, 0 skipped, 2 failed.
python hash seed: * (glob)
[1]
@@ -393,8 +393,8 @@
ERROR: test-failure-unicode.t output changed
!
+ Failed test-failure-unicode.t: output changed
Failed test-failure.t: output changed
- Failed test-failure-unicode.t: output changed
# Ran 3 tests, 0 skipped, 2 failed.
python hash seed: * (glob)
[1]