[PATCH 06 of 11 FOR-REFERENCE] test-run-tests.t: tests the --retest option

Anurag Goel anurag.dsps at gmail.com
Wed Jun 4 16:14:00 CDT 2014


Following patch fixed the retesting failure error.

While retesting, only failure tests run and others either skipped, ignored
or passed. Therefore, to nullify the effect we need to add skipped and
ignored tests in total failure tests.

diff -r 9774e39b08da tests/run-tests.py
--- a/tests/run-tests.py    Wed Jun 04 23:22:27 2014 +0530
+++ b/tests/run-tests.py    Thu Jun 05 02:39:48 2014 +0530
@@ -1101,7 +1101,8 @@
         if self.showAll:
             self.stream.writeln('ignored %s' % reason)
         else:
-            self.stream.write('i')
+            if reason != 'not retesting':
+                self.stream.write('i')
             self.stream.flush()

     def addWarn(self, test, reason):
@@ -1310,6 +1311,9 @@

         self._runner._checkhglib('Tested')

+        if self._runner.options.retest:
+            result.testsRun = result.testsRun + skipped + ignored
+
         # This differs from unittest's default output in that we don't
count
         # skipped and ignored tests as part of the total test count.
         self.stream.writeln('# Ran %d tests, %d skipped, %d warned, %d
failed.'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20140605/6b62c3fe/attachment.html>


More information about the Mercurial-devel mailing list