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