[oe-commits] [openembedded-core] 02/18: oeqa/runner: Simplify code
git at git.openembedded.org
git at git.openembedded.org
Wed Jul 11 12:48:59 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit c412a91981123bb0eef239d0261ca4bf20cf830c
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Jul 11 11:54:20 2018 +0000
oeqa/runner: Simplify code
There doesn't appear to be any reason we need this _results indirection
so remove it.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/core/runner.py | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index 374d30c..8eb1806 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -45,7 +45,6 @@ class OETestResult(_TestResult):
self.successes = []
self.tc = tc
- self._tc_map_results()
def startTest(self, test):
# Allow us to trigger the testcase buffer mode on a per test basis
@@ -55,13 +54,6 @@ class OETestResult(_TestResult):
self.buffer = test.buffer
super(OETestResult, self).startTest(test)
- def _tc_map_results(self):
- self.tc._results['failures'] = self.failures
- self.tc._results['errors'] = self.errors
- self.tc._results['skipped'] = self.skipped
- self.tc._results['expectedFailures'] = self.expectedFailures
- self.tc._results['successes'] = self.successes
-
def logSummary(self, component, context_msg=''):
elapsed_time = self.tc._run_end_time - self.tc._run_start_time
self.tc.logger.info("SUMMARY:")
@@ -73,7 +65,7 @@ class OETestResult(_TestResult):
msg = "%s - OK - All required tests passed" % component
else:
msg = "%s - FAIL - Required tests failed" % component
- skipped = len(self.tc._results['skipped'])
+ skipped = len(self.skipped)
if skipped:
msg += " (skipped=%d)" % skipped
self.tc.logger.info(msg)
@@ -81,7 +73,7 @@ class OETestResult(_TestResult):
def _getDetailsNotPassed(self, case, type, desc):
found = False
- for (scase, msg) in self.tc._results[type]:
+ for (scase, msg) in getattr(self, type):
# XXX: When XML reporting is enabled scase is
# xmlrunner.result._TestInfo instance instead of
# string.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list