Mercurial > hg
changeset 21455:0f0bace82149
run-tests: move err file writing to tearDown()
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 21 Apr 2014 09:30:11 -0700 |
parents | 046587aa1c8a |
children | a06a4142ad1f |
files | tests/run-tests.py |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Sun Apr 20 15:40:22 2014 -0700 +++ b/tests/run-tests.py Mon Apr 21 09:30:11 2014 -0700 @@ -515,13 +515,6 @@ else: self._result = self.success() - if (ret != 0 or out != self._refout) and not self._skipped \ - and not options.debug: - f = open(self._errpath, 'wb') - for line in out: - f.write(line) - f.close() - if not self._unittest: self.tearDown() @@ -532,6 +525,13 @@ if not self._options.keep_tmpdir: shutil.rmtree(self._testtmp) + if (self._ret != 0 or self._out != self._refout) and not self._skipped \ + and not self._options.debug and self._out: + f = open(self._errpath, 'wb') + for line in self._out: + f.write(line) + f.close() + vlog("# Ret was:", self._ret) # Don't print progress in unittest mode because that is handled