bitbake: bitbake: tests/data: add test for incorrect remove behaviour
authorRoss Burton <ross.burton@intel.com>
Mon, 2 Feb 2015 15:09:24 +0000 (15:09 +0000)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sun, 26 Jul 2015 13:13:57 +0000 (10:13 -0300)
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.

(Bitbake rev: cb2a62a5fbffb358528a85b46c1fc6383286cb9d)

(Bitbake rev: ed950f95fc80f069e800e9c6e785641f307e6512)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
bitbake/lib/bb/tests/data.py

index 9b09ff4..23a5e5f 100644 (file)
@@ -266,6 +266,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()