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:37:56 +0100 |
| commit | 042b70da3b4166bd240265f4e5ab242a439755de (patch) | |
| tree | 4468439de145d8abc7243260ead8be966185e7f2 /bitbake/lib | |
| parent | 8b74f2ca55a08454beee77141dcdfe51e343298a (diff) | |
| download | poky-042b70da3b4166bd240265f4e5ab242a439755de.tar.gz | |
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>
Diffstat (limited to 'bitbake/lib')
| -rw-r--r-- | bitbake/lib/bb/tests/data.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/data.py b/bitbake/lib/bb/tests/data.py index 251130b857..b7676859a6 100644 --- a/bitbake/lib/bb/tests/data.py +++ b/bitbake/lib/bb/tests/data.py | |||
| @@ -86,6 +86,10 @@ class DataExpansions(unittest.TestCase): | |||
| 86 | val = self.d.expand("${@testfunc(d)}") | 86 | val = self.d.expand("${@testfunc(d)}") |
| 87 | self.assertEqual(str(val), "testvalue") | 87 | self.assertEqual(str(val), "testvalue") |
| 88 | 88 | ||
| 89 | def test_python_snippet_builtin_metadata(self): | ||
| 90 | self.d.setVar("eval", "INVALID") | ||
| 91 | self.d.expand("${@eval('3')}") | ||
| 92 | |||
| 89 | def test_python_unexpanded(self): | 93 | def test_python_unexpanded(self): |
| 90 | self.d.setVar("bar", "${unsetvar}") | 94 | self.d.setVar("bar", "${unsetvar}") |
| 91 | val = self.d.expand("${@d.getVar('foo') + ' ${bar}'}") | 95 | val = self.d.expand("${@d.getVar('foo') + ' ${bar}'}") |
