summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-07 15:11:39 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-08 11:16:03 +0000
commit94b37d134dc45a51b92a6e0cddbdca4b309c23c5 (patch)
treeb6ae449a3b629cd731ccce85f5c54eb9fe6c04db /bitbake/lib/bb/tests
parentdf85dd54857b06ca514d01091929b577753ce94e (diff)
downloadpoky-94b37d134dc45a51b92a6e0cddbdca4b309c23c5.tar.gz
bitbake: 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. (Bitbake rev: 08c314eac231ac9292c8c95f1c5a6fc2023fe749) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests')
-rw-r--r--bitbake/lib/bb/tests/data.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/data.py b/bitbake/lib/bb/tests/data.py
index db3e2010a9..3c511f214b 100644
--- a/bitbake/lib/bb/tests/data.py
+++ b/bitbake/lib/bb/tests/data.py
@@ -394,6 +394,15 @@ class TestOverrides(unittest.TestCase):
394 self.d.setVar("OVERRIDES", "foo:bar:some_val") 394 self.d.setVar("OVERRIDES", "foo:bar:some_val")
395 self.assertEqual(self.d.getVar("TEST"), " testvalue5") 395 self.assertEqual(self.d.getVar("TEST"), " testvalue5")
396 396
397 # Test an override with _<numeric> in it based on a real world OE issue
398 def test_underscore_override(self):
399 self.d.setVar("TARGET_ARCH", "x86_64")
400 self.d.setVar("PN", "test-${TARGET_ARCH}")
401 self.d.setVar("VERSION", "1")
402 self.d.setVar("VERSION_pn-test-${TARGET_ARCH}", "2")
403 self.d.setVar("OVERRIDES", "pn-${PN}")
404 bb.data.expandKeys(self.d)
405 self.assertEqual(self.d.getVar("VERSION"), "2")
397 406
398class TestKeyExpansion(unittest.TestCase): 407class TestKeyExpansion(unittest.TestCase):
399 def setUp(self): 408 def setUp(self):