diff options
author | Christopher Larson <kergoth@gmail.com> | 2022-03-17 16:10:35 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-08-04 11:36:44 +0100 |
commit | e9150447738a48f772240874b3512b08e982b19b (patch) | |
tree | c74c523b46fe4829dec73b21416c6b4059c94482 | |
parent | 9976ae50677b333d646ca0fd395468bd2301d03f (diff) | |
download | bitbake-contrib-e9150447738a48f772240874b3512b08e982b19b.tar.gz |
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.
Signed-off-by: Christopher Larson <kergoth@gmail.com>
-rw-r--r-- | lib/bb/tests/data.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/tests/data.py b/lib/bb/tests/data.py index 251130b85..b7676859a 100644 --- a/lib/bb/tests/data.py +++ b/lib/bb/tests/data.py @@ -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}'}") |