[gnome-continuous-yocto/gnomeostree-3.28-rocko: 8190/8267] oeqa/runqemu: Only show stdout/stderr upon test failure
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 8190/8267] oeqa/runqemu: Only show stdout/stderr upon test failure
- Date: Sun, 17 Dec 2017 07:18:14 +0000 (UTC)
commit 3f6fbed1e13f117cad68249119ed3c467364438c
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: Wed Nov 8 14:03:28 2017 +0000
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: 1826a8cb8cf4c51307003617864d2ffab273eb0b)
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
Signed-off-by: Armin Kuster <akuster mvista com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/lib/oeqa/core/runner.py | 8 ++++++++
meta/lib/oeqa/selftest/cases/runqemu.py | 2 ++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index f6539e6..2d756da 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
diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py
index 1991be7..1a8d121 100644
--- a/meta/lib/oeqa/selftest/cases/runqemu.py
+++ b/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -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()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]