[PATCH 3 of 7] run-tests: introduce 'warned' as test result

Simon Heimberg simohe at besonet.ch
Thu Feb 13 16:36:57 CST 2014


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1392275694 -3600
#      Thu Feb 13 08:14:54 2014 +0100
# Node ID 6f3a78790475271b5f3a0a1bd02f2573f71309d1
# Parent  19e87c239bfeef21b439f4c1b3436af1f0096f44
run-tests: introduce 'warned' as test result

While running, a test resulting in 'warned' is shown as '~'.
Test results with state warned are listed between the skipped and the failed
tests. Example:
Skipped test-revert-flags.t: missing feature: executable bit
Skipped test-inotify-lookup.t: missing feature: inotify extension support
Warned test-something.t: output changed
Failed test-largefiles.t: output changed
Failed test-subrepo.t: output changed
# Ran 11 tests, 2 skipped, 1 warned, 2 failed.


The test result "warned" will be used in later patches.

diff -r 19e87c239bfe -r 6f3a78790475 tests/run-tests.py
--- a/tests/run-tests.py	Thu Feb 13 08:02:06 2014 +0100
+++ b/tests/run-tests.py	Thu Feb 13 08:14:54 2014 +0100
@@ -1074,7 +1074,7 @@
                          '         (expected %s)\n'
                          % (verb, actualhg, expecthg))
 
-results = {'.':[], '!':[], 's':[], 'i':[]}
+results = {'.':[], '!':[], '~': [], 's':[], 'i':[]}
 times = []
 iolock = threading.Lock()
 abort = False
@@ -1138,7 +1138,8 @@
         scheduletests(options, tests)
 
         failed = len(results['!'])
-        tested = len(results['.']) + failed
+        warned = len(results['~'])
+        tested = len(results['.']) + failed + warned
         skipped = len(results['s'])
         ignored = len(results['i'])
 
@@ -1146,11 +1147,13 @@
         if not options.noskips:
             for s in results['s']:
                 print "Skipped %s: %s" % s
+        for s in results['~']:
+            print "Warned %s: %s" % s
         for s in results['!']:
             print "Failed %s: %s" % s
         _checkhglib("Tested")
-        print "# Ran %d tests, %d skipped, %d failed." % (
-            tested, skipped + ignored, failed)
+        print "# Ran %d tests, %d skipped, %d warned, %d failed." % (
+            tested, skipped + ignored, warned, failed)
         if results['!']:
             print 'python hash seed:', os.environ['PYTHONHASHSEED']
         if options.time:




More information about the Mercurial-devel mailing list