Mercurial > hg
changeset 6383:38485d45f947
run-tests.py: Only one fail message when output changed and error code.
This fixes passing back fail messages mistaken for skip messages when
running with parallel jobs because run_children() only expects one message per
fail.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 24 Mar 2008 22:09:01 +0100 |
parents | f3c3965fa0ff |
children | 8bc876e03143 |
files | tests/run-tests.py |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Mon Mar 24 18:07:07 2008 -0300 +++ b/tests/run-tests.py Mon Mar 24 22:09:01 2008 +0100 @@ -359,7 +359,6 @@ signal.alarm(0) skipped = (ret == SKIPPED_STATUS) - diffret = 0 # If reference output file exists, check test output against it if os.path.exists(ref): f = open(ref, "r") @@ -367,19 +366,20 @@ f.close() else: ref_out = [] - if not skipped and out != ref_out: - diffret = 1 - fail("output changed") - show_diff(ref_out, out) if skipped: missing = extract_missing_features(out) if not missing: missing = ['irrelevant'] skip(missing[-1]) + elif out != ref_out: + if ret: + fail("output changed and returned error code %d" % ret) + else: + fail("output changed") + show_diff(ref_out, out) + ret = 1 elif ret: fail("returned error code %d" % ret) - elif diffret: - ret = diffret if not verbose: sys.stdout.write(skipped and 's' or '.')