Commit Graph

7 Commits

Author SHA1 Message Date
Richard Purdie 0f2c59367a bitbake: bitbake: Convert to python 3
Various misc changes to convert bitbake to python3 which don't warrant
separation into separate commits.

(Bitbake rev: d0f904d407f57998419bd9c305ce53e5eaa36b24)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:02 +01:00
Richard Purdie a9d90f7405 bitbake: tests: assertEquals -> assertEqual
The preferred form is assertEqual, assertEquals is deprecated and
not present in python v3.

This is v2.7 safe.

(Bitbake rev: b60261bf8ade14aca31238b50c243c01adcabc59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:34:30 +01:00
Olof Johansson c886a786cf bitbake: 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'

(Bitbake rev: f1fe674397ac5cd355696d5b4cc90b7cfa6c867f)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19 17:38:51 +00:00
Richard Purdie e955def4d3 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>
2014-03-02 17:25:29 +00:00
Olof Johansson 96f0a39e7c bitbake: fetch2: Add editor modelines for bb.tests.*
(Bitbake rev: 230e00948ba093958e8e89e9ee380444b3dad307)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-17 22:32:05 +00:00
Richard Purdie bc7c8fa99a bitbake: tests/codeparser: Hack around circular inclusion problem
There is a circular dependency issue where bb.data can't directly depend on
bb.parse. The tests were failing due to this issue which is misleading. This
patch hacks around it for now. I'd rather that than not running tests at all.

(Bitbake rev: a206ae0d7769a41ff3666d0f53ff9cf422dfa518)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-15 12:12:35 +00:00
Richard Purdie 12ebec4c94 bitbake: Add start of bitbake regression/self testing
This adds some basic unit testing for the codeparser and data store code. Many of
the actual test cases were taken from work by Chris Larson's OE-Signatures work but with
changes to adapt to the current bitbake APIs we need to test.

I also imported CoW tests written by Holger Freyther from the original bitbake-test
codebase: http://svn.berlios.de/wsvn/bitbake/trunk/bitbake-tests/tests/ and
some tests from the doctests that were removed in commit:
http://git.openembedded.org/bitbake/commit?id=3a11c2807972bbbddffde2fa67fc380d159da467

(Bitbake rev: ae4a95780e3e08cf73c854efa8cd93379e00c4e5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-04 16:58:35 +01:00