From ed950f95fc80f069e800e9c6e785641f307e6512 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 2 Feb 2015 15:09:24 +0000 Subject: bitbake: tests/data: add test for incorrect remove behaviour 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) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster Signed-off-by: Richard Purdie --- lib/bb/tests/data.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/bb/tests/data.py b/lib/bb/tests/data.py index 9b09ff4c6..23a5e5fd9 100644 --- a/lib/bb/tests/data.py +++ b/lib/bb/tests/data.py @@ -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() -- cgit 1.2.3-korg