aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/tests
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-03-20 17:05:52 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-21 21:01:56 +0000
commit4f9d6f060ed247fb6fa2f45668a892a1788d3f91 (patch)
tree79aee54d849ed2bbaab451ba17735531e47dbe59 /lib/bb/tests
parent1ff9b3c669fa187f152de7b8b57d14c2468d926c (diff)
downloadbitbake-4f9d6f060ed247fb6fa2f45668a892a1788d3f91.tar.gz
tinfoil: fix override handling in remote datastores
There was a huge gap in the remote datastore code introduced in the tinfoil2 rework - we weren't handling overrides at all, since these are stored separately from the actual data in the DataSmart object. Thus, when a datastore actually represents a remote datastore we need to go back to that remote datastore to get the override data as well, so introduce code to do that. To avoid a second round-trip I had to modify the _findVar() function to return the override data as well. This will increase the overhead a little when that data is superfluous, but without making the function even uglier I don't think there's a way to avoid that. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/tests')
-rw-r--r--lib/bb/tests/data.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/tests/data.py b/lib/bb/tests/data.py
index 895489e02..da3f4e66f 100644
--- a/lib/bb/tests/data.py
+++ b/lib/bb/tests/data.py
@@ -503,3 +503,7 @@ class Remote(unittest.TestCase):
# Test client side data is incorporated in python expansion (which is done on server)
d2.setVar('FOO', 'bar')
self.assertEqual(d2.expand('${@d.getVar("FOO")}'), 'bar')
+ # Test overrides work
+ d1.setVar('FOO_test', 'baz')
+ d1.appendVar('OVERRIDES', ':test')
+ self.assertEqual(d2.getVar('FOO'), 'baz')