1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 05:09:24 +00:00

bitbake: tests.data: add test for builtin preferred over metadata value

This test makes sure that '${@eval()}' calls the eval builtin, even if an 'eval' variable is defined in the metadata.

(Bitbake rev: e9150447738a48f772240874b3512b08e982b19b)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Christopher Larson
2022-03-17 16:10:35 -07:00
committed by Richard Purdie
parent 8b74f2ca55
commit 042b70da3b
+4
View File
@@ -86,6 +86,10 @@ class DataExpansions(unittest.TestCase):
val = self.d.expand("${@testfunc(d)}")
self.assertEqual(str(val), "testvalue")
def test_python_snippet_builtin_metadata(self):
self.d.setVar("eval", "INVALID")
self.d.expand("${@eval('3')}")
def test_python_unexpanded(self):
self.d.setVar("bar", "${unsetvar}")
val = self.d.expand("${@d.getVar('foo') + ' ${bar}'}")