[oe-commits] [bitbake] 03/07: tests.data: Add underscore+numeric in overrides datastore test

git at git.openembedded.org git at git.openembedded.org
Tue Jan 8 11:16:38 UTC 2019

This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository bitbake.

commit 08c314eac231ac9292c8c95f1c5a6fc2023fe749
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Mon Jan 7 15:11:39 2019 +0000

    tests.data: Add underscore+numeric in overrides datastore test
    Add a test for x86_64 in overrides where is was being incorrectly handled.
    There was a previous fix (3a3be518536acc868c7eeb3c1111ad1b321480b7) but
    this ensures we don't regress.
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
 lib/bb/tests/data.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/bb/tests/data.py b/lib/bb/tests/data.py
index db3e201..3c511f2 100644
--- a/lib/bb/tests/data.py
+++ b/lib/bb/tests/data.py
@@ -394,6 +394,15 @@ class TestOverrides(unittest.TestCase):
         self.d.setVar("OVERRIDES", "foo:bar:some_val")
         self.assertEqual(self.d.getVar("TEST"), " testvalue5")
+    # Test an override with _<numeric> in it based on a real world OE issue
+    def test_underscore_override(self):
+        self.d.setVar("TARGET_ARCH", "x86_64")
+        self.d.setVar("PN", "test-${TARGET_ARCH}")
+        self.d.setVar("VERSION", "1")
+        self.d.setVar("VERSION_pn-test-${TARGET_ARCH}", "2")
+        self.d.setVar("OVERRIDES", "pn-${PN}")
+        bb.data.expandKeys(self.d)
+        self.assertEqual(self.d.getVar("VERSION"), "2")
 class TestKeyExpansion(unittest.TestCase):
     def setUp(self):

To stop receiving notification emails like this one, please contact
the administrator of this repository.

More information about the Openembedded-commits mailing list