# HG changeset patch # User Vadim Gelfer # Date 1146850898 25200 # Node ID 6f76a479ae518f5358b9820e91007074781bb987 # Parent 8164e3f31638535b3ad69c6056bcb00576ead47a run-tests.py must print changed test output no matter what exit code is. diff -r 8164e3f31638 -r 6f76a479ae51 tests/run-tests.py --- a/tests/run-tests.py Fri May 05 10:31:03 2006 -0700 +++ b/tests/run-tests.py Fri May 05 10:41:38 2006 -0700 @@ -176,18 +176,20 @@ ret, out = run(cmd) vlog("# Ret was:", ret) - if ret == 0: - # If reference output file exists, check test output against it - if os.path.exists(ref): - f = open(ref, "r") - ref_out = f.read().splitlines() - f.close() - if out != ref_out: - ret = 1 - print "\nERROR: %s output changed" % (test) - show_diff(ref_out, out) - else: + diffret = 0 + # If reference output file exists, check test output against it + if os.path.exists(ref): + f = open(ref, "r") + ref_out = f.read().splitlines() + f.close() + if out != ref_out: + diffret = 1 + print "\nERROR: %s output changed" % (test) + show_diff(ref_out, out) + if ret: print "\nERROR: %s failed with error code %d" % (test, ret) + elif diffret: + ret = diffret if ret != 0: # Save errors to a file for diagnosis f = open(err, "w")