mirror of
https://git.yoctoproject.org/poky
synced 2026-04-22 15:32:14 +02:00
oeqa/selftest/resulttool: fix ptest filtering tests
There are multiple issues with the tests for the ptest fixup mechanism
introduced in c45d58f003:
- 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>
This commit is contained in:
committed by
Richard Purdie
parent
e8048a5b66
commit
e3b005d8eb
@@ -305,39 +305,47 @@ class ResultToolTests(OESelftestTestCase):
|
||||
msg="incorrect ltpresult filtering, matching ltpresult content should be compared")
|
||||
|
||||
def test_can_match_non_static_ptest_names(self):
|
||||
base_configuration = {"configuration": {
|
||||
"TEST_TYPE": "runtime",
|
||||
"MACHINE": "qemux86"
|
||||
}, "result": {
|
||||
"ptestresult.lttng-tools.foo_-_bar_-_moo": {
|
||||
"STATUS": "PASSED"
|
||||
},
|
||||
"ptestresult.babeltrace.bar_-_moo_-_foo": {
|
||||
"STATUS": "PASSED"
|
||||
},
|
||||
"ptestresult.babletrace2.moo_-_foo_-_bar": {
|
||||
"STATUS": "PASSED"
|
||||
},
|
||||
"ptestresult.curl.test_0000__foo_out_of_bar": {
|
||||
"STATUS": "PASSED"
|
||||
}
|
||||
}}
|
||||
target_configuration = {"configuration": {
|
||||
"TEST_TYPE": "runtime",
|
||||
"MACHINE": "qemux86"
|
||||
}, "result": {
|
||||
"ptestresult.lttng-tools.xxx_-_yyy_-_zzz": {
|
||||
"STATUS": "PASSED"
|
||||
},
|
||||
"ptestresult.babeltrace.yyy_-_zzz_-_xxx": {
|
||||
"STATUS": "PASSED"
|
||||
},
|
||||
"ptestresult.babletrace2.zzz_-_xxx_-_yyy": {
|
||||
"STATUS": "PASSED"
|
||||
},
|
||||
"ptestresult.curl.test_0000__xxx_out_of_yyy": {
|
||||
"STATUS": "PASSED"
|
||||
}
|
||||
}}
|
||||
self.assertTrue(regression.can_be_compared(self.logger, base_configuration, target_configuration),
|
||||
msg="incorrect ptests filtering, tests shoould be compared if prefixes match")
|
||||
base_configuration = {"a": {
|
||||
"conf_X": {
|
||||
"configuration": {
|
||||
"TEST_TYPE": "runtime",
|
||||
"MACHINE": "qemux86"
|
||||
}, "result": {
|
||||
"ptestresult.lttng-tools.foo_-_bar_-_moo": {
|
||||
"status": "PASSED"
|
||||
},
|
||||
"ptestresult.babeltrace.bar_-_moo_-_foo": {
|
||||
"status": "PASSED"
|
||||
},
|
||||
"ptestresult.babeltrace2.moo_-_foo_-_bar": {
|
||||
"status": "PASSED"
|
||||
},
|
||||
"ptestresult.curl.test_0000__foo_out_of_bar": {
|
||||
"status": "PASSED"
|
||||
}
|
||||
}}}}
|
||||
target_configuration = {"a": {
|
||||
"conf_Y": {
|
||||
"configuration": {
|
||||
"TEST_TYPE": "runtime",
|
||||
"MACHINE": "qemux86"
|
||||
}, "result": {
|
||||
"ptestresult.lttng-tools.foo_-_yyy_-_zzz": {
|
||||
"status": "PASSED"
|
||||
},
|
||||
"ptestresult.babeltrace.bar_-_zzz_-_xxx": {
|
||||
"status": "PASSED"
|
||||
},
|
||||
"ptestresult.babeltrace2.moo_-_xxx_-_yyy": {
|
||||
"status": "PASSED"
|
||||
},
|
||||
"ptestresult.curl.test_0000__xxx_out_of_yyy": {
|
||||
"status": "PASSED"
|
||||
}
|
||||
}}}}
|
||||
regression.fixup_ptest_names(base_configuration, self.logger)
|
||||
regression.fixup_ptest_names(target_configuration, self.logger)
|
||||
result, resultstring = regression.compare_result(
|
||||
self.logger, "A", "B", base_configuration["a"]["conf_X"], target_configuration["a"]["conf_Y"])
|
||||
self.assertDictEqual(
|
||||
result, {}, msg=f"ptests should be compared: {resultstring}")
|
||||
|
||||
Reference in New Issue
Block a user