mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
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>
This commit is contained in:
parent
729b1d3afd
commit
a3a122d2f5
|
@ -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
|
||||
|
|
|
@ -14,6 +14,8 @@ class RunqemuTests(OESelftestTestCase):
|
|||
|
||||
image_is_ready = False
|
||||
deploy_dir_image = ''
|
||||
# We only want to print runqemu stdout/stderr if there is a test case failure
|
||||
buffer = True
|
||||
|
||||
def setUpLocal(self):
|
||||
super(RunqemuTests, self).setUpLocal()
|
||||
|
|
Loading…
Reference in New Issue
Block a user