run-tests: report timeouts in a less alarming fashion
authorMatt Mackall <mpm@selenic.com>
Fri, 04 Dec 2015 14:55:10 -0600
changeset 27393 a40b623e6380
parent 27391 4eeef1b2d689
child 27394 b4d7743e174a
run-tests: report timeouts in a less alarming fashion Rather than report timed-out tests like this: ERROR: test-convert-svn-sink.t output changed ! ..simply put a 't' rather than a '.' in the stream.
tests/run-tests.py
tests/test-run-tests.t
--- a/tests/run-tests.py	Wed Dec 16 17:40:01 2015 -0600
+++ b/tests/run-tests.py	Fri Dec 04 14:55:10 2015 -0600
@@ -1273,10 +1273,13 @@
             self.stop()
         else:
             with iolock:
-                if not self._options.nodiff:
-                    self.stream.write('\nERROR: %s output changed\n' % test)
+                if reason == "timed out":
+                    self.stream.write('t')
+                else:
+                    if not self._options.nodiff:
+                        self.stream.write('\nERROR: %s output changed\n' % test)
+                    self.stream.write('!')
 
-                self.stream.write('!')
                 self.stream.flush()
 
     def addSuccess(self, test):
--- a/tests/test-run-tests.t	Wed Dec 16 17:40:01 2015 -0600
+++ b/tests/test-run-tests.t	Fri Dec 04 14:55:10 2015 -0600
@@ -412,9 +412,7 @@
   > cat test-timeout.t >> test-slow-timeout.t
   $ run-tests.py --with-hg=`which hg` --timeout=1 --slowtimeout=3 \
   > test-timeout.t test-slow-timeout.t
-  s
-  ERROR: test-timeout.t output changed
-  !
+  st
   Skipped test-slow-timeout.t: skipped
   Failed test-timeout.t: timed out
   # Ran 1 tests, 1 skipped, 0 warned, 1 failed.
@@ -422,9 +420,7 @@
   [1]
   $ run-tests.py --with-hg=`which hg` --timeout=1 --slowtimeout=3 \
   > test-timeout.t test-slow-timeout.t --allow-slow-tests
-  .
-  ERROR: test-timeout.t output changed
-  !
+  .t
   Failed test-timeout.t: timed out
   # Ran 2 tests, 0 skipped, 0 warned, 1 failed.
   python hash seed: * (glob)