# HG changeset patch # User Simon Heimberg # Date 2014-02-13 07:27:53 # Node ID 8ac08939c3fcb605738d266d03cc5a94aa2145d6 # Parent 91d4f82c2d3b63e15f22d4a82e018356800debc2 run-tests: report a test as warned when only missing globs On windows, some test reported as failed will now be reported as "warned". diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -776,6 +776,7 @@ def tsttest(test, wd, options, replaceme # Merge the script output back into a unified test + warnonly = True pos = -1 postout = [] for l in output: @@ -796,7 +797,7 @@ def tsttest(test, wd, options, replaceme if isinstance(r, str): if r == '+glob': lout = el[:-1] + ' (glob)\n' - r = False + r = 0 # warn only elif r == '-glob': log('\ninfo, unnecessary glob in %s (after line %d):' ' %s (glob)\n' % (test, pos, el[:-1])) @@ -810,6 +811,8 @@ def tsttest(test, wd, options, replaceme if needescape(lout): lout = stringescape(lout.rstrip('\n')) + " (esc)\n" postout.append(" " + lout) # let diff deal with it + if r != 0: # != warn only + warnonly = False if lcmd: # add on last return code @@ -824,6 +827,8 @@ def tsttest(test, wd, options, replaceme if pos in after: postout += after.pop(pos) + if warnonly and exitcode == 0: + exitcode = False return exitcode, postout wifexited = getattr(os, "WIFEXITED", lambda x: False)