[bitbake-devel] [PATCH 1/2] tests/data: add test for incorrect remove behaviour

Ross Burton ross.burton at intel.com
Mon Feb 2 15:09:24 UTC 2015


The _remove operator isn't working correctly when used with a variable that
expands to several items, so add a test case to exercise this path.

Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 bitbake/lib/bb/tests/data.py |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/bitbake/lib/bb/tests/data.py b/bitbake/lib/bb/tests/data.py
index 81e4091..7994a88 100644
--- a/bitbake/lib/bb/tests/data.py
+++ b/bitbake/lib/bb/tests/data.py
@@ -272,6 +272,13 @@ class TestConcatOverride(unittest.TestCase):
         bb.data.update_data(self.d)
         self.assertEqual(self.d.getVar("TEST", True), "Y")
 
+    def test_remove_expansion_items(self):
+        self.d.setVar("TEST", "A B C D")
+        self.d.setVar("BAR", "B D")
+        self.d.setVar("TEST_remove", "${BAR}")
+        bb.data.update_data(self.d)
+        self.assertEqual(self.d.getVar("TEST", True), "A C")
+
 class TestOverrides(unittest.TestCase):
     def setUp(self):
         self.d = bb.data.init()
-- 
1.7.10.4



More information about the bitbake-devel mailing list