summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikko Rapeli <mikko.rapeli@linaro.org>2025-04-04 18:47:02 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-04-10 11:05:59 +0100
commit3369269a1eac9df0c3c20d87f8180e5253fb202a (patch)
tree73072269cdf09aa5eeb6729a7b9760a1721daa4b
parent1cd8d4e8922d327d826ee1dc98cf7185bb98ef3e (diff)
downloadpoky-3369269a1eac9df0c3c20d87f8180e5253fb202a.tar.gz
selftest pokybleeding.py: add test for poky-bleeding.bbclass
The class sets SRCREV to AUTOINC for recipes with single or multiple repositories. Test those cases. (From meta-yocto rev: b7185b27b8acb43eaf9c27787903173ea34a0738) Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/cases/pokybleeding.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/pokybleeding.py b/meta/lib/oeqa/selftest/cases/pokybleeding.py
new file mode 100644
index 0000000000..dc12f761b9
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/pokybleeding.py
@@ -0,0 +1,32 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7from oeqa.utils.commands import bitbake, get_bb_var
8from oeqa.selftest.case import OESelftestTestCase
9
10class PokyBleeding(OESelftestTestCase):
11
12 def test_poky_bleeding_autorev(self):
13 """
14 Test that poky-bleeding.bbclass sets SRCREV to "AUTOINC" for recipe
15 with a single scm in SRC_URI and for recipe with two scm's in SRC_URI.
16 """
17
18 self.assertNotEqual( get_bb_var('SRCREV', 'mtd-utils-selftest'), "AUTOINC")
19
20 self.assertNotEqual( get_bb_var('SRCREV', 'hello-rs'), "AUTOINC")
21 self.assertNotEqual( get_bb_var('SRCREV_hello-lib', 'hello-rs'), "AUTOINC")
22
23 features = '''
24INHERIT += "poky-bleeding"
25POKY_AUTOREV_RECIPES = "hello-rs mtd-utils-selftest"
26'''
27 self.write_config(features)
28
29 self.assertEqual( get_bb_var('SRCREV', 'mtd-utils-selftest'), "AUTOINC")
30
31 self.assertEqual( get_bb_var('SRCREV', 'hello-rs'), "AUTOINC")
32 self.assertEqual( get_bb_var('SRCREV_hello-lib', 'hello-rs'), "AUTOINC")