diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-28 17:38:15 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-02 17:25:29 +0000 |
commit | e955def4d3929f44d27d2958ab3ff4b48534f26f (patch) | |
tree | a8afeb20a608b8528793b8c0151be6bea952f788 /bitbake | |
parent | 69b4614ff3cfe6f92e3271062aed06cc01151299 (diff) | |
download | poky-e955def4d3929f44d27d2958ab3ff4b48534f26f.tar.gz |
bitbake: codeparser: Fix var_execs to append to execs, not references
When using the "execs" information in new code, it became clear that
the returned data was incorrect and there were missing exec'd functions.
This corrects the error and changes one of the test results to match
the correct behaviour.
(Bitbake rev: 8a24f2d3b735bbc59ca4a09670cabbadb1868c1a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/codeparser.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/tests/codeparser.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py index 62b6cf9e3a..a50b9f268a 100644 --- a/bitbake/lib/bb/codeparser.py +++ b/bitbake/lib/bb/codeparser.py | |||
@@ -186,7 +186,7 @@ class PythonParser(): | |||
186 | if n.__class__.__name__ == "Call": | 186 | if n.__class__.__name__ == "Call": |
187 | self.visit_Call(n) | 187 | self.visit_Call(n) |
188 | 188 | ||
189 | self.references.update(self.var_execs) | 189 | self.execs.update(self.var_execs) |
190 | 190 | ||
191 | codeparsercache.pythoncacheextras[h] = {} | 191 | codeparsercache.pythoncacheextras[h] = {} |
192 | codeparsercache.pythoncacheextras[h]["refs"] = self.references | 192 | codeparsercache.pythoncacheextras[h]["refs"] = self.references |
diff --git a/bitbake/lib/bb/tests/codeparser.py b/bitbake/lib/bb/tests/codeparser.py index 938b04b2c6..4454bc51ed 100644 --- a/bitbake/lib/bb/tests/codeparser.py +++ b/bitbake/lib/bb/tests/codeparser.py | |||
@@ -236,7 +236,8 @@ be. These unit tests are testing snippets.""" | |||
236 | self.d.setVar("do_something", "echo 'hi mom! ${FOO}'") | 236 | self.d.setVar("do_something", "echo 'hi mom! ${FOO}'") |
237 | self.d.setVarFlag("do_something", etype, True) | 237 | self.d.setVarFlag("do_something", etype, True) |
238 | self.parseExpression("bb.build.exec_func('do_something', d)") | 238 | self.parseExpression("bb.build.exec_func('do_something', d)") |
239 | self.assertReferences(set(["do_something"])) | 239 | self.assertReferences(set([])) |
240 | self.assertExecs(set(["do_something"])) | ||
240 | 241 | ||
241 | def test_function_reference(self): | 242 | def test_function_reference(self): |
242 | self.context["testfunc"] = lambda msg: bb.msg.note(1, None, msg) | 243 | self.context["testfunc"] = lambda msg: bb.msg.note(1, None, msg) |