# HG changeset patch # User Pierre-Yves David # Date 1400312226 25200 # Node ID 3b0c522f04aa45062ae474e2c3929b4dc757d3d7 # Parent 28414e5ac9ec6ec05253d19303dffd8b1d5ab93f run-test: restore the -i prompt by write .err before checking if it exists The `--interactive` flag workis by overwriting the original test file by its `.err` version. So we need to write it before calling `self.fail`. Otherwise the `.err` file does not exists and `--interactive` is ignored. We can move that block code around because it is dedicated to write changed output and we moves it in the try-except dedicated to handling changed output. Note that the flog is still badly broken after this change. But at least it crash instead of being ignored. diff -r 28414e5ac9ec -r 3b0c522f04aa tests/run-tests.py --- a/tests/run-tests.py Sun Apr 20 11:04:25 2014 -0700 +++ b/tests/run-tests.py Sat May 17 00:37:06 2014 -0700 @@ -473,18 +473,18 @@ else: msg += 'output changed' + if (ret != 0 or out != self._refout) and not skipped \ + and not options.debug: + f = open(self._errpath, 'wb') + for line in out: + f.write(line) + f.close() res = self.fail(msg, ret) elif ret: res = self.fail(describe(ret), ret) else: res = self.success() - if (ret != 0 or out != self._refout) and not skipped \ - and not options.debug: - f = open(self._errpath, 'wb') - for line in out: - f.write(line) - f.close() vlog("# Ret was:", ret)