summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/core
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-08 14:03:28 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-09 12:24:24 +0000
commita3a122d2f58a6e3a220c099b2e948d4b4b280c4e (patch)
tree91b0539dc9a027a5a58bdd9371c5e0874ec583c7 /meta/lib/oeqa/core
parent729b1d3afd3d4b8eed4a4f4ddeb27780db47dcd5 (diff)
downloadpoky-a3a122d2f58a6e3a220c099b2e948d4b4b280c4e.tar.gz
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. (From OE-Core rev: 86bef95bccbe9dad3dc3445ea365439861966179) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/core')
-rw-r--r--meta/lib/oeqa/core/runner.py8
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):
45 self.tc = tc 45 self.tc = tc
46 self._tc_map_results() 46 self._tc_map_results()
47 47
48 def startTest(self, test):
49 # Allow us to trigger the testcase buffer mode on a per test basis
50 # so stdout/stderr are only printed upon failure. Enables debugging
51 # but clean output
52 if hasattr(test, "buffer"):
53 self.buffer = True
54 super(OETestResult, self).startTest(test)
55
48 def _tc_map_results(self): 56 def _tc_map_results(self):
49 self.tc._results['failures'] = self.failures 57 self.tc._results['failures'] = self.failures
50 self.tc._results['errors'] = self.errors 58 self.tc._results['errors'] = self.errors