All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/codeparser.py: Add filename/lineno flags to test variable
@ 2016-01-19 15:04 Olof Johansson
  2016-01-19 17:48 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Olof Johansson @ 2016-01-19 15:04 UTC (permalink / raw)
  To: bitbake-devel

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>
---
 bitbake/lib/bb/tests/codeparser.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/tests/codeparser.py b/bitbake/lib/bb/tests/codeparser.py
index 4454bc5..bb820e4 100644
--- a/bitbake/lib/bb/tests/codeparser.py
+++ b/bitbake/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)
 
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tests/codeparser.py: Add filename/lineno flags to test variable
  2016-01-19 15:04 [PATCH] tests/codeparser.py: Add filename/lineno flags to test variable Olof Johansson
@ 2016-01-19 17:48 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2016-01-19 17:48 UTC (permalink / raw)
  To: Olof Johansson, bitbake-devel

On Tue, 2016-01-19 at 16:04 +0100, Olof Johansson wrote:
> 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'

Thanks. I'm asking awkward questions about why we didn't find that
sooner too (if I didn't spot it, our QA infrastructure should have)...

Cheers,

Richard


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-19 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-19 15:04 [PATCH] tests/codeparser.py: Add filename/lineno flags to test variable Olof Johansson
2016-01-19 17:48 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.