summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/resulttooltests.py
diff options
context:
space:
mode:
authorAlexis Lothoré <alexis.lothore@bootlin.com>2023-02-28 19:10:46 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-12 23:39:12 +0000
commite3b005d8eb26c2b08923d5a6880df7b78e19192c (patch)
tree376b90bf2a3b5d8c294586d3eed57ffde99a2410 /meta/lib/oeqa/selftest/cases/resulttooltests.py
parente8048a5b66d9833a9d41df3a160dd48e3de104b0 (diff)
downloadpoky-e3b005d8eb26c2b08923d5a6880df7b78e19192c.tar.gz
oeqa/selftest/resulttool: fix ptest filtering tests
There are multiple issues with the tests for the ptest fixup mechanism introduced in c45d58f003e8d8b323169ca9d479dc49c43a9974: - the feature does not impact regression.can_be_compared but directly the comparison step in regression.regression_common - the "status" field was wrong ("STATUS"), which prevents tests comparison - there is a typo babeltrace2 ptest result name (From OE-Core rev: 69205e2e2117fc469fcf3ae4b2174482db1d6297) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/resulttooltests.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/resulttooltests.py80
1 files changed, 44 insertions, 36 deletions
diff --git a/meta/lib/oeqa/selftest/cases/resulttooltests.py b/meta/lib/oeqa/selftest/cases/resulttooltests.py
index f059991c19..8489ae8eb5 100644
--- a/meta/lib/oeqa/selftest/cases/resulttooltests.py
+++ b/meta/lib/oeqa/selftest/cases/resulttooltests.py
@@ -305,39 +305,47 @@ class ResultToolTests(OESelftestTestCase):
305 msg="incorrect ltpresult filtering, matching ltpresult content should be compared") 305 msg="incorrect ltpresult filtering, matching ltpresult content should be compared")
306 306
307 def test_can_match_non_static_ptest_names(self): 307 def test_can_match_non_static_ptest_names(self):
308 base_configuration = {"configuration": { 308 base_configuration = {"a": {
309 "TEST_TYPE": "runtime", 309 "conf_X": {
310 "MACHINE": "qemux86" 310 "configuration": {
311 }, "result": { 311 "TEST_TYPE": "runtime",
312 "ptestresult.lttng-tools.foo_-_bar_-_moo": { 312 "MACHINE": "qemux86"
313 "STATUS": "PASSED" 313 }, "result": {
314 }, 314 "ptestresult.lttng-tools.foo_-_bar_-_moo": {
315 "ptestresult.babeltrace.bar_-_moo_-_foo": { 315 "status": "PASSED"
316 "STATUS": "PASSED" 316 },
317 }, 317 "ptestresult.babeltrace.bar_-_moo_-_foo": {
318 "ptestresult.babletrace2.moo_-_foo_-_bar": { 318 "status": "PASSED"
319 "STATUS": "PASSED" 319 },
320 }, 320 "ptestresult.babeltrace2.moo_-_foo_-_bar": {
321 "ptestresult.curl.test_0000__foo_out_of_bar": { 321 "status": "PASSED"
322 "STATUS": "PASSED" 322 },
323 } 323 "ptestresult.curl.test_0000__foo_out_of_bar": {
324 }} 324 "status": "PASSED"
325 target_configuration = {"configuration": { 325 }
326 "TEST_TYPE": "runtime", 326 }}}}
327 "MACHINE": "qemux86" 327 target_configuration = {"a": {
328 }, "result": { 328 "conf_Y": {
329 "ptestresult.lttng-tools.xxx_-_yyy_-_zzz": { 329 "configuration": {
330 "STATUS": "PASSED" 330 "TEST_TYPE": "runtime",
331 }, 331 "MACHINE": "qemux86"
332 "ptestresult.babeltrace.yyy_-_zzz_-_xxx": { 332 }, "result": {
333 "STATUS": "PASSED" 333 "ptestresult.lttng-tools.foo_-_yyy_-_zzz": {
334 }, 334 "status": "PASSED"
335 "ptestresult.babletrace2.zzz_-_xxx_-_yyy": { 335 },
336 "STATUS": "PASSED" 336 "ptestresult.babeltrace.bar_-_zzz_-_xxx": {
337 }, 337 "status": "PASSED"
338 "ptestresult.curl.test_0000__xxx_out_of_yyy": { 338 },
339 "STATUS": "PASSED" 339 "ptestresult.babeltrace2.moo_-_xxx_-_yyy": {
340 } 340 "status": "PASSED"
341 }} 341 },
342 self.assertTrue(regression.can_be_compared(self.logger, base_configuration, target_configuration), 342 "ptestresult.curl.test_0000__xxx_out_of_yyy": {
343 msg="incorrect ptests filtering, tests shoould be compared if prefixes match") 343 "status": "PASSED"
344 }
345 }}}}
346 regression.fixup_ptest_names(base_configuration, self.logger)
347 regression.fixup_ptest_names(target_configuration, self.logger)
348 result, resultstring = regression.compare_result(
349 self.logger, "A", "B", base_configuration["a"]["conf_X"], target_configuration["a"]["conf_Y"])
350 self.assertDictEqual(
351 result, {}, msg=f"ptests should be compared: {resultstring}")