Patchwork [7,of,7] run-tests: unnecessary globs also count as warnings

login
register
mail settings
Submitter Simon Heimberg
Date Feb. 13, 2014, 10:37 p.m.
Message ID <849c295a2349281de13f.1392331021@lapsasi>
Download mbox | patch
Permalink /patch/3650/
State Accepted
Commit edfbcc3163a89df8b9a77d658cb375dcbbf61244
Headers show

Comments

Simon Heimberg - Feb. 13, 2014, 10:37 p.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1392276584 -3600
#      Thu Feb 13 08:29:44 2014 +0100
# Node ID 849c295a2349281de13fe11ad26ea63a428593cd
# Parent  13e3899cf9a242d61348c23001ab0d4f2801965a
run-tests: unnecessary globs also count as warnings

When a glob is unnecessary, now there's a diff output and 'run-tests.py -i'
works for accepting the output.
On windows, some tests which have "passed" currently (with some info lines
printed) will now be reported as "warned". (I recommend to recognize "warned"
by buildbot before applying this patch.)
Matt Mackall - Feb. 16, 2014, 12:53 a.m.
On Thu, 2014-02-13 at 23:37 +0100, Simon Heimberg wrote:
> # HG changeset patch
> # User Simon Heimberg <simohe@besonet.ch>
> # Date 1392276584 -3600
> #      Thu Feb 13 08:29:44 2014 +0100
> # Node ID 849c295a2349281de13fe11ad26ea63a428593cd
> # Parent  13e3899cf9a242d61348c23001ab0d4f2801965a
> run-tests: unnecessary globs also count as warnings

These are queued for default, thanks.

Patch

diff -r 13e3899cf9a2 -r 849c295a2349 tests/run-tests.py
--- a/tests/run-tests.py	Thu Feb 13 08:27:53 2014 +0100
+++ b/tests/run-tests.py	Thu Feb 13 08:29:44 2014 +0100
@@ -799,9 +799,8 @@ 
                     lout = el[:-1] + ' (glob)\n'
                     r = 0 # warn only
                 elif r == '-glob':
-                    log('\ninfo, unnecessary glob in %s (after line %d):'
-                        ' %s (glob)\n' % (test, pos, el[:-1]))
-                    r = True # pass on unnecessary glob
+                    lout = ''.join(el.rsplit(' (glob)', 1))
+                    r = 0 # warn only
                 else:
                     log('\ninfo, unknown linematch result: %r\n' % r)
                     r = False