[gnome-continuous-yocto/gnomeostree-3.28-rocko: 6039/8267] oeqa/core: Don't expose OEStreamLogger in OETestContext
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 6039/8267] oeqa/core: Don't expose OEStreamLogger in OETestContext
- Date: Sun, 17 Dec 2017 04:17:00 +0000 (UTC)
commit 5507c394e795a13701c6d3e0017e13feea217581
Author: Aníbal Limón <anibal limon linux intel com>
Date: Fri May 26 15:37:30 2017 -0500
oeqa/core: Don't expose OEStreamLogger in OETestContext
The OEStreamLogger class is used for redirect PyUnit output
to a certain logger so there is not need to expose at level
of OETestContext because only OETestRunner needs to know.
[YOCTO #11450]
(From OE-Core rev: 8787fba3df8acd9d2438669d20b1a5060caa9022)
Signed-off-by: Aníbal Limón <anibal limon linux intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/lib/oeqa/core/context.py | 6 ++----
meta/lib/oeqa/core/runner.py | 3 +++
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index 4476750..2628651 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -10,12 +10,11 @@ import collections
import re
from oeqa.core.loader import OETestLoader
-from oeqa.core.runner import OETestRunner, OEStreamLogger, xmlEnabled
+from oeqa.core.runner import OETestRunner, xmlEnabled
class OETestContext(object):
loaderClass = OETestLoader
runnerClass = OETestRunner
- streamLoggerClass = OEStreamLogger
files_dir = os.path.abspath(os.path.join(os.path.dirname(
os.path.abspath(__file__)), "../files"))
@@ -52,8 +51,7 @@ class OETestContext(object):
self.suites = self.loader.discover()
def runTests(self):
- streamLogger = self.streamLoggerClass(self.logger)
- self.runner = self.runnerClass(self, stream=streamLogger, verbosity=2)
+ self.runner = self.runnerClass(self, verbosity=2)
self._run_start_time = time.time()
result = self.runner.run(self.suites)
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index 44ffecb..40fbf3b 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -48,12 +48,15 @@ class OETestResult(_TestResult):
super(OETestResult, self).startTest(test)
class OETestRunner(_TestRunner):
+ streamLoggerClass = OEStreamLogger
+
def __init__(self, tc, *args, **kwargs):
if xmlEnabled:
if not kwargs.get('output'):
kwargs['output'] = os.path.join(os.getcwd(),
'TestResults_%s_%s' % (time.strftime("%Y%m%d%H%M%S"), os.getpid()))
+ kwargs['stream'] = self.streamLoggerClass(tc.logger)
super(OETestRunner, self).__init__(*args, **kwargs)
self.tc = tc
self.resultclass = OETestResult
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]