summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/data.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-13 08:50:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-13 08:52:49 +0100
commitfceef0cace6670a8c5f15cd2f31a191176732730 (patch)
tree44894c81118fc2d4c9a8bce3c94c3dd6f6f17915 /bitbake/lib/bb/tests/data.py
parent429802fe6691c8a70ec9735c0db4c6a4e1e1b038 (diff)
downloadpoky-fceef0cace6670a8c5f15cd2f31a191176732730.tar.gz
bitbake: data_smart: Fix remove operator and its interaction with data expansion
If you have: FOO = "${bindir}/X Y" FOO_remove = "${bindir}/X" the expected result is "Y". Currently this doesn't work since the removed expressions are not expanded first. This patch adjusts things so the expressions are expanded before being processed for removal. Also add a test to ensure this case continues to work. [YOCTO #6624] (Bitbake rev: 72a1ca4a104ccab73d6abcbd44db9c2636a58572) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/data.py')
-rw-r--r--bitbake/lib/bb/tests/data.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/data.py b/bitbake/lib/bb/tests/data.py
index 944a906653..9b09ff4c61 100644
--- a/bitbake/lib/bb/tests/data.py
+++ b/bitbake/lib/bb/tests/data.py
@@ -259,6 +259,13 @@ class TestConcatOverride(unittest.TestCase):
259 bb.data.update_data(self.d) 259 bb.data.update_data(self.d)
260 self.assertEqual(self.d.getVar("TEST", True), "") 260 self.assertEqual(self.d.getVar("TEST", True), "")
261 261
262 def test_remove_expansion(self):
263 self.d.setVar("BAR", "Z")
264 self.d.setVar("TEST", "${BAR}/X Y")
265 self.d.setVar("TEST_remove", "${BAR}/X")
266 bb.data.update_data(self.d)
267 self.assertEqual(self.d.getVar("TEST", True), "Y")
268
262class TestOverrides(unittest.TestCase): 269class TestOverrides(unittest.TestCase):
263 def setUp(self): 270 def setUp(self):
264 self.d = bb.data.init() 271 self.d = bb.data.init()