Mercurial > hg > mercurial-crew-with-dirclash
comparison tests/run-tests.py @ 2246:3fd603eb6add
run-tests.py: print diff if reference output not existing.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Wed, 10 May 2006 10:07:53 -0700 |
parents | 6f76a479ae51 |
children | 546c76e5a3e6 |
comparison
equal
deleted
inserted
replaced
2243:caf2c6ef5b0e | 2246:3fd603eb6add |
---|---|
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 else: |
186 diffret = 1 | 186 ref_out = '' |
187 print "\nERROR: %s output changed" % (test) | 187 if out != ref_out: |
188 show_diff(ref_out, out) | 188 diffret = 1 |
189 print "\nERROR: %s output changed" % (test) | |
190 show_diff(ref_out, out) | |
189 if ret: | 191 if ret: |
190 print "\nERROR: %s failed with error code %d" % (test, ret) | 192 print "\nERROR: %s failed with error code %d" % (test, ret) |
191 elif diffret: | 193 elif diffret: |
192 ret = diffret | 194 ret = diffret |
193 | 195 |