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.
--- 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 '.')