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.
--- 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: