summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-19 12:24:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-20 14:27:03 +0100
commita9dc2ac9e00e3bbea872c8d22568e3acfb9ba3d4 (patch)
treea5219b7daa29d83c1f6123f8bb56509f27df70ed /bitbake/lib/bb/tests
parent52f1041e1a99d391d954f138589cef497a143cb1 (diff)
downloadpoky-a9dc2ac9e00e3bbea872c8d22568e3acfb9ba3d4.tar.gz
bitbake: data_smart: Fix removal handling interaction issue with overrides
If a variable has a _remove applied to it but that variable is in turn 'renamed' through OVERRIDES, the removal gets lost with the current code. TEST = "foo" TEST_someval = "bar" TEST_someval_remove = "bar" OVERRIDES = "someval" currently gives "bar" for TEST but should give "". This fixes the code to track the removal and adds a test case to ensure this doesn't regress again. (Bitbake rev: 8f55010c18057be040f073d8bcb4c5c2c311d809) 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 9ac78e3683..db3e2010a9 100644
--- a/bitbake/lib/bb/tests/data.py
+++ b/bitbake/lib/bb/tests/data.py
@@ -386,6 +386,15 @@ class TestOverrides(unittest.TestCase):
386 self.d.setVar("OVERRIDES", "foo:bar:some_val") 386 self.d.setVar("OVERRIDES", "foo:bar:some_val")
387 self.assertEqual(self.d.getVar("TEST"), "testvalue3") 387 self.assertEqual(self.d.getVar("TEST"), "testvalue3")
388 388
389 def test_remove_with_override(self):
390 self.d.setVar("TEST_bar", "testvalue2")
391 self.d.setVar("TEST_some_val", "testvalue3 testvalue5")
392 self.d.setVar("TEST_some_val_remove", "testvalue3")
393 self.d.setVar("TEST_foo", "testvalue4")
394 self.d.setVar("OVERRIDES", "foo:bar:some_val")
395 self.assertEqual(self.d.getVar("TEST"), " testvalue5")
396
397
389class TestKeyExpansion(unittest.TestCase): 398class TestKeyExpansion(unittest.TestCase):
390 def setUp(self): 399 def setUp(self):
391 self.d = bb.data.init() 400 self.d = bb.data.init()