# HG changeset patch # User Simon Heimberg # Date 1389870537 -3600 # Node ID 79f68c0ed71ec29b83204fbc2fa3b691f28b9f8c # Parent b82811d8ce22a71e3eb937bfdd2e0790f69dedf1 run-tests: print more information on unnecessary glob matching Extend the message with the test name and the approximate line number. (The line number is the one of the command producing the output.) Finding the line to fix is easier now. old message: ...... Info, unnecessary glob: at a/b/c (glob) .. new message: ...... Info, unnecessary glob in test-example.t (after line 9): at a/b/c (glob) .. The test result is still pass as before. [ original upstream message ] diff -r b82811d8ce22 -r 79f68c0ed71e tests/run-tests.py --- a/tests/run-tests.py Thu Jan 16 12:08:29 2014 +0100 +++ b/tests/run-tests.py Thu Jan 16 12:08:57 2014 +0100 @@ -606,7 +606,7 @@ if el + '\n' == l: if os.altsep: # matching on "/" is not needed for this line - log("\nInfo, unnecessary glob: %s (glob)" % el) + return '-glob' return True i, n = 0, len(el) res = '' @@ -797,7 +797,14 @@ if isinstance(r, str): if r == '+glob': lout = el[:-1] + ' (glob)\n' - r = False + r = False + 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 + else: + log('\ninfo, unknown linematch result: %r\n' % r) + r = False if r: postout.append(" " + el) else: