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 |
|
179 | diffret = 0 | |
180 |
|
|
180 | # If reference output file exists, check test output against it | |
181 |
|
|
181 | if os.path.exists(ref): | |
182 |
|
|
182 | f = open(ref, "r") | |
183 |
|
|
183 | ref_out = f.read().splitlines() | |
184 |
|
|
184 | f.close() | |
185 |
|
|
185 | if out != ref_out: | |
186 |
|
|
186 | diffret = 1 | |
187 |
|
|
187 | print "\nERROR: %s output changed" % (test) | |
188 |
|
|
188 | show_diff(ref_out, out) | |
189 |
|
|
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