diff -r 48123437bbc5 -r 95880c8fedb6 tests/run-tests.py --- a/tests/run-tests.py Tue Jan 14 15:51:15 2014 +0000 +++ b/tests/run-tests.py Fri Jan 17 15:32:21 2014 +0000 @@ -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 = '' @@ -634,9 +634,12 @@ el = el[:-7].decode('string-escape') + '\n' if el == l or os.name == 'nt' and el[:-1] + '\r\n' == l: return True - if (el.endswith(" (re)\n") and rematch(el[:-6], l) or - el.endswith(" (glob)\n") and globmatch(el[:-8], l)): - return True + if el.endswith(" (re)\n"): + return rematch(el[:-6], l) + if el.endswith(" (glob)\n"): + return globmatch(el[:-8], l) + if os.altsep and l.replace('\\', '/') == el: + return '+glob' return False def tsttest(test, wd, options, replacements, env): @@ -790,7 +793,19 @@ if pos in expected and expected[pos]: el = expected[pos].pop(0) - if linematch(el, lout): + r = linematch(el, lout) + if isinstance(r, str): + if r == '+glob': + lout = el[:-1] + ' (glob)\n' + 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: if needescape(lout): @@ -1077,6 +1092,9 @@ done.put(runone(options, test, count)) except KeyboardInterrupt: pass + except: # re-raises + done.put(('!', test, 'run-test raised an error, see traceback')) + raise try: while tests or running: @@ -1093,7 +1111,7 @@ test = tests.pop(0) if options.loop: tests.append(test) - t = threading.Thread(target=job, args=(test, count)) + t = threading.Thread(target=job, name=test, args=(test, count)) t.start() running += 1 count += 1