--- 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