diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2017-05-26 15:37:30 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-02 13:36:13 +0100 |
commit | 5507c394e795a13701c6d3e0017e13feea217581 (patch) | |
tree | 363be39ca870e1e199afd832c41ec91ad49d819e /meta/lib/oeqa/core/runner.py | |
parent | d05acd6babffedd7150d3abd8fece7bb553aeebb (diff) | |
download | poky-5507c394e795a13701c6d3e0017e13feea217581.tar.gz |
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>
Diffstat (limited to 'meta/lib/oeqa/core/runner.py')
-rw-r--r-- | meta/lib/oeqa/core/runner.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py index 44ffecb0cd..40fbf3b423 100644 --- a/meta/lib/oeqa/core/runner.py +++ b/meta/lib/oeqa/core/runner.py | |||
@@ -48,12 +48,15 @@ class OETestResult(_TestResult): | |||
48 | super(OETestResult, self).startTest(test) | 48 | super(OETestResult, self).startTest(test) |
49 | 49 | ||
50 | class OETestRunner(_TestRunner): | 50 | class OETestRunner(_TestRunner): |
51 | streamLoggerClass = OEStreamLogger | ||
52 | |||
51 | def __init__(self, tc, *args, **kwargs): | 53 | def __init__(self, tc, *args, **kwargs): |
52 | if xmlEnabled: | 54 | if xmlEnabled: |
53 | if not kwargs.get('output'): | 55 | if not kwargs.get('output'): |
54 | kwargs['output'] = os.path.join(os.getcwd(), | 56 | kwargs['output'] = os.path.join(os.getcwd(), |
55 | 'TestResults_%s_%s' % (time.strftime("%Y%m%d%H%M%S"), os.getpid())) | 57 | 'TestResults_%s_%s' % (time.strftime("%Y%m%d%H%M%S"), os.getpid())) |
56 | 58 | ||
59 | kwargs['stream'] = self.streamLoggerClass(tc.logger) | ||
57 | super(OETestRunner, self).__init__(*args, **kwargs) | 60 | super(OETestRunner, self).__init__(*args, **kwargs) |
58 | self.tc = tc | 61 | self.tc = tc |
59 | self.resultclass = OETestResult | 62 | self.resultclass = OETestResult |