Add a test for resulttool.durations.build_rows(), covering that
comparisons are only generated for consecutive sources (e.g.
RUN1->RUN2, RUN2->RUN3), never something like RUN1->RUN3.
AI-Generated: Uses Claude Sonnet 5
---
meta/lib/oeqa/selftest/cases/resulttooltests.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/lib/oeqa/selftest/cases/resulttooltests.py
b/meta/lib/oeqa/selftest/cases/resulttooltests.py
index dfaa4edbba..28acc939f1 100644
--- a/meta/lib/oeqa/selftest/cases/resulttooltests.py
+++ b/meta/lib/oeqa/selftest/cases/resulttooltests.py
@@ -742,3 +742,13 @@ class ResultToolTests(OESelftestTestCase):
self.assertEqual(rowmap['tiny'], [(0.2, None)])
# normal case: delta and percentage both reported
self.assertEqual(rowmap['big'], [(50.0, 50.0)])
+
+ def test_durations_build_rows_computes_consecutive_pairs_only(self):
+ # 3 sources: deltas should be (run1,run2) and (run2,run3), never
(run1,run3)
+ alldurations = [{'path': {'t': 10.0}}, {'path': {'t': 100.0}},
{'path': {'t': 11.0}}]
+ rows = durations.build_rows(['t'], 'path', alldurations)
+ k, vals, deltas = rows[0]
+ self.assertEqual(vals, [10.0, 100.0, 11.0])
+ self.assertEqual(len(deltas), 2)
+ self.assertEqual(deltas[0], (90.0, 900.0))
+ self.assertEqual(deltas[1][0], -89.0)
--
2.55.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#246545):
https://lists.openembedded.org/g/openembedded-core/message/246545
Mute This Topic: https://lists.openembedded.org/mt/121399146/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-