Patchwork run-tests: fix typo and print out failing line

login
register
mail settings
Submitter Simon Heimberg
Date Feb. 11, 2014, 2:14 p.m.
Message ID <e3f44fe626ea7d9dbc34.1392128079@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/3566/
State Accepted
Commit 1478a9ce679097c03234201d179e48c58d0b5c1d
Headers show

Comments

Simon Heimberg - Feb. 11, 2014, 2:14 p.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1392077707 -3600
# Node ID e3f44fe626ea7d9dbc34a851abdfdf84355b8ffc
# Parent  f5cbdf0e62069e5917ac53aa5754b2ddee799906
run-tests: fix typo and print out failing line

Instead of stripping the newline and printing the line, only the newline was
printed.
The output on buildbot will make more sense now.
Matt Mackall - Feb. 11, 2014, 4:32 p.m.
On Tue, 2014-02-11 at 15:14 +0100, Simon Heimberg wrote:
> # HG changeset patch
> # User Simon Heimberg <simohe@besonet.ch>
> # Date 1392077707 -3600
> # Node ID e3f44fe626ea7d9dbc34a851abdfdf84355b8ffc
> # Parent  f5cbdf0e62069e5917ac53aa5754b2ddee799906
> run-tests: fix typo and print out failing line
> 
> Instead of stripping the newline and printing the line, only the newline was
> printed.
> The output on buildbot will make more sense now.

Nice catch, queued for default.
Simon Heimberg - Feb. 11, 2014, 7:56 p.m.
--On 2014-02-11 10:32 -0600 Matt Mackall <mpm@selenic.com> wrote:
> On Tue, 2014-02-11 at 15:14 +0100, Simon Heimberg wrote:
>> # HG changeset patch
>> # User Simon Heimberg <simohe@besonet.ch>
>> # Date 1392077707 -3600
>> # Node ID e3f44fe626ea7d9dbc34a851abdfdf84355b8ffc
>> # Parent  f5cbdf0e62069e5917ac53aa5754b2ddee799906
>> run-tests: fix typo and print out failing line
>>
>> Instead of stripping the newline and printing the line, only the newline
>> was printed.
>> The output on buildbot will make more sense now.
>
> Nice catch, queued for default.

Well, it was my own typo...

>
> --
> Mathematics is the supreme nostalgia of our time.

Patch

diff -r f5cbdf0e6206 -r e3f44fe626ea tests/run-tests.py
--- a/tests/run-tests.py	Mon Feb 10 22:56:10 2014 +0100
+++ b/tests/run-tests.py	Die Feb 11 01:15:07 2014 +0100
@@ -800,7 +800,7 @@ 
                     r = False
                 elif r == '-glob':
                     log('\ninfo, unnecessary glob in %s (after line %d):'
-                        ' %s (glob)\n' % (test, pos, el[-1]))
+                        ' %s (glob)\n' % (test, pos, el[:-1]))
                     r = True # pass on unnecessary glob
                 else:
                     log('\ninfo, unknown linematch result: %r\n' % r)