]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: codeparser: Fix var_execs to append to execs, not references
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 28 Feb 2014 17:38:15 +0000 (17:38 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 2 Mar 2014 17:25:29 +0000 (17:25 +0000)
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>
bitbake/lib/bb/codeparser.py
bitbake/lib/bb/tests/codeparser.py

index 62b6cf9e3abfdc8d5f6a898e7b44dc6648c5b1e6..a50b9f268a0a10f81317bd150d9c3bc93a28a377 100644 (file)
@@ -186,7 +186,7 @@ class PythonParser():
             if n.__class__.__name__ == "Call":
                 self.visit_Call(n)
 
-        self.references.update(self.var_execs)
+        self.execs.update(self.var_execs)
 
         codeparsercache.pythoncacheextras[h] = {}
         codeparsercache.pythoncacheextras[h]["refs"] = self.references
index 938b04b2c605c96da454e93ee9999459dcbea290..4454bc51edb60664a2690ded6ddda43e1e35afb6 100644 (file)
@@ -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)