Mercurial > hg
changeset 2213:6f76a479ae51
run-tests.py must print changed test output no matter what exit code is.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 05 May 2006 10:41:38 -0700 |
parents | 8164e3f31638 |
children | 6c6c0e5595a2 |
files | tests/run-tests.py |
diffstat | 1 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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")