Mercurial > hg-stable
changeset 21449:aedf18bcde11
run-tests: store test return code and output in Test instance
A subsequent patch that will introduce tearDown() requires test
execution state be stored in the instance.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 20 Apr 2014 14:58:36 -0700 |
parents | f2dbbcacc763 |
children | a6e40416f172 |
files | tests/run-tests.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Sun Apr 20 14:55:33 2014 -0700 +++ b/tests/run-tests.py Sun Apr 20 14:58:36 2014 -0700 @@ -357,6 +357,8 @@ self._unittest = unittest self._finished = None + self._ret = None + self._out = None # If we're not in --debug mode and reference output file exists, # check test output against it. @@ -382,6 +384,8 @@ def setUp(self): """Tasks to perform before run().""" self._finished = False + self._ret = None + self._out = None def run(self): """Run this test instance. @@ -433,6 +437,8 @@ ret, out = self._run(testtmp, replacements, env) duration = time.time() - starttime self._finished = True + self._ret = ret + self._out = out except KeyboardInterrupt: duration = time.time() - starttime log('INTERRUPTED: %s (after %d seconds)' % (self.name, duration))