##// END OF EJS Templates
run-tests.py must print changed test output no matter what exit code is.
Vadim Gelfer -
r2213:6f76a479 default
parent child Browse files
Show More
@@ -176,18 +176,20 b' def run_one(test):'
176 ret, out = run(cmd)
176 ret, out = run(cmd)
177 vlog("# Ret was:", ret)
177 vlog("# Ret was:", ret)
178
178
179 if ret == 0:
179 diffret = 0
180 # If reference output file exists, check test output against it
180 # If reference output file exists, check test output against it
181 if os.path.exists(ref):
181 if os.path.exists(ref):
182 f = open(ref, "r")
182 f = open(ref, "r")
183 ref_out = f.read().splitlines()
183 ref_out = f.read().splitlines()
184 f.close()
184 f.close()
185 if out != ref_out:
185 if out != ref_out:
186 ret = 1
186 diffret = 1
187 print "\nERROR: %s output changed" % (test)
187 print "\nERROR: %s output changed" % (test)
188 show_diff(ref_out, out)
188 show_diff(ref_out, out)
189 else:
189 if ret:
190 print "\nERROR: %s failed with error code %d" % (test, ret)
190 print "\nERROR: %s failed with error code %d" % (test, ret)
191 elif diffret:
192 ret = diffret
191
193
192 if ret != 0: # Save errors to a file for diagnosis
194 if ret != 0: # Save errors to a file for diagnosis
193 f = open(err, "w")
195 f = open(err, "w")
General Comments 0
You need to be logged in to leave comments. Login now