aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/tests/codeparser.py
diff options
context:
space:
mode:
authorOlof Johansson <olof.johansson@axis.com>2016-01-19 16:04:11 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-19 17:42:20 +0000
commit4eb15605a1436631b3673bdba39af14bcb3a0e6d (patch)
tree9a2ea1220b9fa5a380bc0fbf4a988341bb374290 /lib/bb/tests/codeparser.py
parent3c2c269dbbbd9a56bd1d0cb4de676baaf3b7ce88 (diff)
downloadbitbake-4eb15605a1436631b3673bdba39af14bcb3a0e6d.tar.gz
bitbake-4eb15605a1436631b3673bdba39af14bcb3a0e6d.tar.bz2
bitbake-4eb15605a1436631b3673bdba39af14bcb3a0e6d.zip
tests/codeparser.py: Add filename/lineno flags to test variable
A recent change in bitbake added filename/lineno information to the parameters of bb.data.build_dependencies(). The codeparser tests required a little adaption to the changes, adding the flags to the FOO variable used in the tests. The error seen when running the tests is a TypeError exception raised in bb.codeparser: TypeError: int() argument must be a string or a number, not 'NoneType' Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/tests/codeparser.py')
-rw-r--r--lib/bb/tests/codeparser.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bb/tests/codeparser.py b/lib/bb/tests/codeparser.py
index 4454bc51..bb820e40 100644
--- a/lib/bb/tests/codeparser.py
+++ b/lib/bb/tests/codeparser.py
@@ -293,7 +293,12 @@ bb.data.getVar(a(), d, False)
def test_python(self):
self.d.setVar("FOO", self.pydata)
self.setEmptyVars(["inexpand", "a", "test2", "test"])
- self.d.setVarFlags("FOO", {"func": True, "python": True})
+ self.d.setVarFlags("FOO", {
+ "func": True,
+ "python": True,
+ "lineno": 1,
+ "filename": "example.bb",
+ })
deps, values = bb.data.build_dependencies("FOO", set(self.d.keys()), set(), set(), self.d)