diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-11-08 14:03:28 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-11-09 11:49:13 +0000 |
commit | 86bef95bccbe9dad3dc3445ea365439861966179 (patch) | |
tree | 0365b7aeb229ff98d4d724177ba4e7835658cf41 /meta/lib/oeqa/core | |
parent | 4155a58aebe9c730be9ff1f68150f34d1cd472e5 (diff) | |
download | openembedded-core-86bef95bccbe9dad3dc3445ea365439861966179.tar.gz openembedded-core-86bef95bccbe9dad3dc3445ea365439861966179.tar.bz2 openembedded-core-86bef95bccbe9dad3dc3445ea365439861966179.zip |
oeqa/runqemu: Only show stdout/stderr upon test failure
In general we don't need to see the output of runqemu however if it fails
we do. Use the buffer option that already exists in TestResult but allow
us to trigger it on a per test basis.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/core')
-rw-r--r-- | meta/lib/oeqa/core/runner.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py index f6539e60b6..2d756da6d0 100644 --- a/meta/lib/oeqa/core/runner.py +++ b/meta/lib/oeqa/core/runner.py @@ -45,6 +45,14 @@ class OETestResult(_TestResult): self.tc = tc self._tc_map_results() + def startTest(self, test): + # Allow us to trigger the testcase buffer mode on a per test basis + # so stdout/stderr are only printed upon failure. Enables debugging + # but clean output + if hasattr(test, "buffer"): + self.buffer = True + super(OETestResult, self).startTest(test) + def _tc_map_results(self): self.tc._results['failures'] = self.failures self.tc._results['errors'] = self.errors |