diff options
Diffstat (limited to 'meta/lib/oeqa/core/runner.py')
-rw-r--r-- | meta/lib/oeqa/core/runner.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py index d50690ab37..a86a706bd9 100644 --- a/meta/lib/oeqa/core/runner.py +++ b/meta/lib/oeqa/core/runner.py | |||
@@ -44,6 +44,7 @@ class OETestResult(_TestResult): | |||
44 | self.endtime = {} | 44 | self.endtime = {} |
45 | self.progressinfo = {} | 45 | self.progressinfo = {} |
46 | self.extraresults = {} | 46 | self.extraresults = {} |
47 | self.shownmsg = [] | ||
47 | 48 | ||
48 | # Inject into tc so that TestDepends decorator can see results | 49 | # Inject into tc so that TestDepends decorator can see results |
49 | tc.results = self | 50 | tc.results = self |
@@ -74,6 +75,7 @@ class OETestResult(_TestResult): | |||
74 | for (scase, msg) in getattr(self, t): | 75 | for (scase, msg) in getattr(self, t): |
75 | if test.id() == scase.id(): | 76 | if test.id() == scase.id(): |
76 | self.tc.logger.info(str(msg)) | 77 | self.tc.logger.info(str(msg)) |
78 | self.shownmsg.append(test.id()) | ||
77 | break | 79 | break |
78 | 80 | ||
79 | def logSummary(self, component, context_msg=''): | 81 | def logSummary(self, component, context_msg=''): |
@@ -169,7 +171,6 @@ class OETestResult(_TestResult): | |||
169 | 171 | ||
170 | def logDetails(self, json_file_dir=None, configuration=None, result_id=None, | 172 | def logDetails(self, json_file_dir=None, configuration=None, result_id=None, |
171 | dump_streams=False): | 173 | dump_streams=False): |
172 | self.tc.logger.info("RESULTS:") | ||
173 | 174 | ||
174 | result = self.extraresults | 175 | result = self.extraresults |
175 | logs = {} | 176 | logs = {} |
@@ -193,6 +194,10 @@ class OETestResult(_TestResult): | |||
193 | report = {'status': status} | 194 | report = {'status': status} |
194 | if log: | 195 | if log: |
195 | report['log'] = log | 196 | report['log'] = log |
197 | # Class setup failures wouldn't enter stopTest so would never display | ||
198 | if case.id() not in self.shownmsg: | ||
199 | self.tc.logger.info("Failure (%s) for %s:\n" % (status, case.id()) + log) | ||
200 | |||
196 | if duration: | 201 | if duration: |
197 | report['duration'] = duration | 202 | report['duration'] = duration |
198 | 203 | ||
@@ -215,6 +220,7 @@ class OETestResult(_TestResult): | |||
215 | report['stderr'] = stderr | 220 | report['stderr'] = stderr |
216 | result[case.id()] = report | 221 | result[case.id()] = report |
217 | 222 | ||
223 | self.tc.logger.info("RESULTS:") | ||
218 | for i in ['PASSED', 'SKIPPED', 'EXPECTEDFAIL', 'ERROR', 'FAILED', 'UNKNOWN']: | 224 | for i in ['PASSED', 'SKIPPED', 'EXPECTEDFAIL', 'ERROR', 'FAILED', 'UNKNOWN']: |
219 | if i not in logs: | 225 | if i not in logs: |
220 | continue | 226 | continue |
@@ -229,6 +235,10 @@ class OETestResult(_TestResult): | |||
229 | # Override as we unexpected successes aren't failures for us | 235 | # Override as we unexpected successes aren't failures for us |
230 | return (len(self.failures) == len(self.errors) == 0) | 236 | return (len(self.failures) == len(self.errors) == 0) |
231 | 237 | ||
238 | def hasAnyFailingTest(self): | ||
239 | # Account for expected failures | ||
240 | return not self.wasSuccessful() or len(self.expectedFailures) | ||
241 | |||
232 | class OEListTestsResult(object): | 242 | class OEListTestsResult(object): |
233 | def wasSuccessful(self): | 243 | def wasSuccessful(self): |
234 | return True | 244 | return True |