summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/codeparser.py
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: bitbake-selftest: add contains testsPaul Eggleton2017-04-051-0/+48
| | | | | | | | | | | Add some tests to verify that we are extracting "contains" information from python expressions in the code in the bb.data and bb.codeparser modules. (Bitbake rev: 88fda492df875dd79b7aecf1f34b38517fc1eb33) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/tests/codeparser: update expand syntax in commentJoshua Lock2017-03-221-2/+2
| | | | | | | | | bb.data.expand(x, d) is deprecated API (Bitbake rev: 71185c19205a77d0511fc00baf95a5433e7106d6) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: remove True option to getVar callsJoshua Lock2016-11-301-6/+6
| | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (Bitbake rev: 3b45c479de8640f92dd1d9f147b02e1eecfaadc8) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb: Don't use deprecated bb.data.getVar/setVar APIRichard Purdie2016-11-231-7/+7
| | | | | | | | | | The old style bb.data.getVar/setVar API is obsolete. Most of bitbake doesn't use it but there were some pieces that escaped conversion. This patch fixes the remaining users mostly in the fetchers. (Bitbake rev: ff7892fa808116acc1ac50effa023a4cb031a5fc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Convert to python 3Richard Purdie2016-06-021-2/+2
| | | | | | | | | 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>
* bitbake: tests: assertEquals -> assertEqualRichard Purdie2016-05-111-4/+4
| | | | | | | | | | | 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>
* bitbake: tests/codeparser.py: Add filename/lineno flags to test variableOlof Johansson2016-01-191-1/+6
| | | | | | | | | | | | | | | | | 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>
* bitbake: codeparser: Fix var_execs to append to execs, not referencesRichard Purdie2014-03-021-1/+2
| | | | | | | | | | | 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: fetch2: Add editor modelines for bb.tests.*Olof Johansson2013-02-171-0/+2
| | | | | | | (Bitbake rev: 230e00948ba093958e8e89e9ee380444b3dad307) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/codeparser: Hack around circular inclusion problemRichard Purdie2013-02-151-0/+3
| | | | | | | | | | 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>
* bitbake: Add start of bitbake regression/self testingRichard Purdie2012-05-041-0/+369
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>