Mercurial > hg
changeset 21335:822050714e72
run-tests: move output writing to Test.run()
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 19 Apr 2014 21:17:39 -0700 |
parents | 6a90ecb6597a |
children | 45ab0668d1b2 |
files | tests/run-tests.py |
diffstat | 1 files changed, 8 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Sat Apr 19 21:14:31 2014 -0700 +++ b/tests/run-tests.py Sat Apr 19 21:17:39 2014 -0700 @@ -627,8 +627,6 @@ try: ret, out = self._run(testtmp, replacements, env) updateduration() - result.ret = ret - result.out = out except KeyboardInterrupt: updateduration() log('INTERRUPTED: %s (after %d seconds)' % (self._test, @@ -698,6 +696,14 @@ f.write(line) f.close() + vlog("# Ret was:", ret) + + if not options.verbose: + iolock.acquire() + sys.stdout.write(res[0]) + sys.stdout.flush() + iolock.release() + return res def _run(self, testtmp, replacements, env): @@ -793,8 +799,6 @@ """Holds the result of a test execution.""" def __init__(self): - self.ret = None - self.out = None self.duration = None self.skipped = False @@ -1157,17 +1161,7 @@ res = TestResult() result = t.run(res) - ret = res.ret - out = res.out - times.append((test, res.duration)) - vlog("# Ret was:", ret) - - if not options.verbose: - iolock.acquire() - sys.stdout.write(result[0]) - sys.stdout.flush() - iolock.release() t.cleanup()