[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: [OE-core] [PATCH 2/6] oeqa/selftest/resulttool: fix ptest tests
From: Alexis Lothoré via lists.openembedded.org <alexis.lot
Date: 2023-02-28 18:10:47
Message-ID: 20230228181052.4191521-4-alexis.lothore () bootlin ! com
[Download RAW message or body]
From: Alexis Lothoré <alexis.lothore@bootlin.com>
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
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
---
.../oeqa/selftest/cases/resulttooltests.py | 80 ++++++++++---------
1 file changed, 44 insertions(+), 36 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/resulttooltests.py \
b/meta/lib/oeqa/selftest/cases/resulttooltests.py index f059991c19c..8489ae8eb52 \
100644
--- a/meta/lib/oeqa/selftest/cases/resulttooltests.py
+++ b/meta/lib/oeqa/selftest/cases/resulttooltests.py
@@ -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}")
--
2.39.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177849): https://lists.openembedded.org/g/openembedded-core/message/177849
Mute This Topic: https://lists.openembedded.org/mt/97296207/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic