diff options
Diffstat (limited to 'meta/lib/oeqa/core/runner.py')
-rw-r--r-- | meta/lib/oeqa/core/runner.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py index 374d30cc38..50122f22b1 100644 --- a/meta/lib/oeqa/core/runner.py +++ b/meta/lib/oeqa/core/runner.py | |||
@@ -44,8 +44,10 @@ class OETestResult(_TestResult): | |||
44 | 44 | ||
45 | self.successes = [] | 45 | self.successes = [] |
46 | 46 | ||
47 | # Inject into tc so that TestDepends decorator can see results | ||
48 | tc.results = self | ||
49 | |||
47 | self.tc = tc | 50 | self.tc = tc |
48 | self._tc_map_results() | ||
49 | 51 | ||
50 | def startTest(self, test): | 52 | def startTest(self, test): |
51 | # Allow us to trigger the testcase buffer mode on a per test basis | 53 | # Allow us to trigger the testcase buffer mode on a per test basis |
@@ -55,13 +57,6 @@ class OETestResult(_TestResult): | |||
55 | self.buffer = test.buffer | 57 | self.buffer = test.buffer |
56 | super(OETestResult, self).startTest(test) | 58 | super(OETestResult, self).startTest(test) |
57 | 59 | ||
58 | def _tc_map_results(self): | ||
59 | self.tc._results['failures'] = self.failures | ||
60 | self.tc._results['errors'] = self.errors | ||
61 | self.tc._results['skipped'] = self.skipped | ||
62 | self.tc._results['expectedFailures'] = self.expectedFailures | ||
63 | self.tc._results['successes'] = self.successes | ||
64 | |||
65 | def logSummary(self, component, context_msg=''): | 60 | def logSummary(self, component, context_msg=''): |
66 | elapsed_time = self.tc._run_end_time - self.tc._run_start_time | 61 | elapsed_time = self.tc._run_end_time - self.tc._run_start_time |
67 | self.tc.logger.info("SUMMARY:") | 62 | self.tc.logger.info("SUMMARY:") |
@@ -73,7 +68,7 @@ class OETestResult(_TestResult): | |||
73 | msg = "%s - OK - All required tests passed" % component | 68 | msg = "%s - OK - All required tests passed" % component |
74 | else: | 69 | else: |
75 | msg = "%s - FAIL - Required tests failed" % component | 70 | msg = "%s - FAIL - Required tests failed" % component |
76 | skipped = len(self.tc._results['skipped']) | 71 | skipped = len(self.skipped) |
77 | if skipped: | 72 | if skipped: |
78 | msg += " (skipped=%d)" % skipped | 73 | msg += " (skipped=%d)" % skipped |
79 | self.tc.logger.info(msg) | 74 | self.tc.logger.info(msg) |
@@ -81,7 +76,7 @@ class OETestResult(_TestResult): | |||
81 | def _getDetailsNotPassed(self, case, type, desc): | 76 | def _getDetailsNotPassed(self, case, type, desc): |
82 | found = False | 77 | found = False |
83 | 78 | ||
84 | for (scase, msg) in self.tc._results[type]: | 79 | for (scase, msg) in getattr(self, type): |
85 | # XXX: When XML reporting is enabled scase is | 80 | # XXX: When XML reporting is enabled scase is |
86 | # xmlrunner.result._TestInfo instance instead of | 81 | # xmlrunner.result._TestInfo instance instead of |
87 | # string. | 82 | # string. |