From 8a24f2d3b735bbc59ca4a09670cabbadb1868c1a Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 28 Feb 2014 17:38:15 +0000 Subject: 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. Signed-off-by: Richard Purdie --- lib/bb/tests/codeparser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/bb/tests/codeparser.py') diff --git a/lib/bb/tests/codeparser.py b/lib/bb/tests/codeparser.py index 938b04b2c..4454bc51e 100644 --- a/lib/bb/tests/codeparser.py +++ b/lib/bb/tests/codeparser.py @@ -236,7 +236,8 @@ be. These unit tests are testing snippets.""" self.d.setVar("do_something", "echo 'hi mom! ${FOO}'") self.d.setVarFlag("do_something", etype, True) self.parseExpression("bb.build.exec_func('do_something', d)") - self.assertReferences(set(["do_something"])) + self.assertReferences(set([])) + self.assertExecs(set(["do_something"])) def test_function_reference(self): self.context["testfunc"] = lambda msg: bb.msg.note(1, None, msg) -- cgit 1.2.3-korg