summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/core/runner.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-08 16:56:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-09 16:31:55 +0100
commitc7592b01478def091b6787412390c61e7ce0a0cd (patch)
tree3c2f26480c6e16fae0ad65b032e3dc0fccfca71b /meta/lib/oeqa/core/runner.py
parentc0dc72bad92e2e4dc0aedb48b969709f821baf73 (diff)
downloadpoky-c7592b01478def091b6787412390c61e7ce0a0cd.tar.gz
oeqa: Drop OETestID
These IDs refer to testopia which we're no longer using. We would now use the test names to definitively reference tests and the IDs can be dropped, along with their supporting code. (From OE-Core rev: 8e2d0575e4e7036b5f60e632f377a8ab2b96ead8) 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.py31
1 files changed, 3 insertions, 28 deletions
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index 478b7b6683..ee1fb43028 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -139,19 +139,13 @@ class OETestResult(_TestResult):
139 139
140 (status, log) = self._getTestResultDetails(case) 140 (status, log) = self._getTestResultDetails(case)
141 141
142 oeid = -1
143 if hasattr(case, 'decorators'):
144 for d in case.decorators:
145 if hasattr(d, 'oeid'):
146 oeid = d.oeid
147
148 t = "" 142 t = ""
149 if case.id() in self.starttime and case.id() in self.endtime: 143 if case.id() in self.starttime and case.id() in self.endtime:
150 t = " (" + "{0:.2f}".format(self.endtime[case.id()] - self.starttime[case.id()]) + "s)" 144 t = " (" + "{0:.2f}".format(self.endtime[case.id()] - self.starttime[case.id()]) + "s)"
151 145
152 if status not in logs: 146 if status not in logs:
153 logs[status] = [] 147 logs[status] = []
154 logs[status].append("RESULTS - %s - Testcase %s: %s%s" % (case.id(), oeid, status, t)) 148 logs[status].append("RESULTS - %s: %s%s" % (case.id(), status, t))
155 report = {'status': status} 149 report = {'status': status}
156 if log: 150 if log:
157 report['log'] = log 151 report['log'] = log
@@ -202,38 +196,19 @@ class OETestRunner(_TestRunner):
202 self._walked_cases = self._walked_cases + 1 196 self._walked_cases = self._walked_cases + 1
203 197
204 def _list_tests_name(self, suite): 198 def _list_tests_name(self, suite):
205 from oeqa.core.decorator.oeid import OETestID
206 from oeqa.core.decorator.oetag import OETestTag 199 from oeqa.core.decorator.oetag import OETestTag
207 200
208 self._walked_cases = 0 201 self._walked_cases = 0
209 202
210 def _list_cases_without_id(logger, case):
211
212 found_id = False
213 if hasattr(case, 'decorators'):
214 for d in case.decorators:
215 if isinstance(d, OETestID):
216 found_id = True
217
218 if not found_id:
219 logger.info('oeid missing for %s' % case.id())
220
221 def _list_cases(logger, case): 203 def _list_cases(logger, case):
222 oeid = None
223 oetag = None 204 oetag = None
224 205
225 if hasattr(case, 'decorators'): 206 if hasattr(case, 'decorators'):
226 for d in case.decorators: 207 for d in case.decorators:
227 if isinstance(d, OETestID): 208 if isinstance(d, OETestTag):
228 oeid = d.oeid
229 elif isinstance(d, OETestTag):
230 oetag = d.oetag 209 oetag = d.oetag
231 210
232 logger.info("%s\t%s\t\t%s" % (oeid, oetag, case.id())) 211 logger.info("%s\t\t%s" % (oetag, case.id()))
233
234 self.tc.logger.info("Listing test cases that don't have oeid ...")
235 self._walk_suite(suite, _list_cases_without_id)
236 self.tc.logger.info("-" * 80)
237 212
238 self.tc.logger.info("Listing all available tests:") 213 self.tc.logger.info("Listing all available tests:")
239 self._walked_cases = 0 214 self._walked_cases = 0