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>
This commit is contained in:
Aníbal Limón
2017-05-26 15:37:30 -05:00
committed by Richard Purdie
parent d05acd6bab
commit 5507c394e7
2 changed files with 5 additions and 4 deletions

View File

@@ -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