# HG changeset patch # User Christian Ebert # Date 1393768387 0 # Node ID 42b428c5fcd895bb72ff67b4e861896afd70938b # Parent ea8abd9436eea2e3fc043e327408c2d2a24f6cbc# Parent 2cb27f4b641c5dbc050dad0c3551d97cc0a8fa0d Merge with stable diff -r ea8abd9436ee -r 42b428c5fcd8 tests/run-tests.py --- a/tests/run-tests.py Tue Feb 25 11:11:46 2014 +0000 +++ b/tests/run-tests.py Sun Mar 02 13:53:07 2014 +0000 @@ -776,7 +776,9 @@ # Merge the script output back into a unified test - warnonly = True + warnonly = 1 # 1: not yet, 2: yes, 3: for sure not + if exitcode != 0: # failure has been reported + warnonly = 3 # set to "for sure not" pos = -1 postout = [] for l in output: @@ -797,10 +799,10 @@ if isinstance(r, str): if r == '+glob': lout = el[:-1] + ' (glob)\n' - r = 0 # warn only + r = '' # warn only this line elif r == '-glob': lout = ''.join(el.rsplit(' (glob)', 1)) - r = 0 # warn only + r = '' # warn only this line else: log('\ninfo, unknown linematch result: %r\n' % r) r = False @@ -810,8 +812,10 @@ 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 r != '': # if line failed + warnonly = 3 # set to "for sure not" + elif warnonly == 1: # is "not yet" (and line is warn only) + warnonly = 2 # set to "yes" do warn if lcmd: # add on last return code @@ -826,8 +830,8 @@ if pos in after: postout += after.pop(pos) - if warnonly and exitcode == 0: - exitcode = False + if warnonly == 2: + exitcode = False # set exitcode to warned return exitcode, postout wifexited = getattr(os, "WIFEXITED", lambda x: False)