summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-selftest
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: tests: Add initial scenario based test for runqueueRichard Purdie2019-07-151-0/+1
| | | | | | | | | | We need some tests for runqueue, its been something which has been hard to test for a long time. Add some dummy metadata to allow this, mirroring the OE structure in spirit. (Bitbake rev: 37564d7440c5d7aa05ec537f3b79026b1c83bb68) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Drop duplicate license boilerplace textRichard Purdie2019-05-041-12/+0
| | | | | | | | | | With the introduction of SPDX-License-Identifier headers, we don't need a ton of header boilerplate in every file. Simplify the files and rely on the top level for the full licence text. (Bitbake rev: 695d84397b68cc003186e22f395caa378b06bc75) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Add initial pass of SPDX license headers to source codeRichard Purdie2019-05-041-0/+2
| | | | | | | | | | | | | | | | | This adds the SPDX-License-Identifier license headers to the majority of our source files to make it clearer exactly which license files are under. The bulk of the files are under GPL v2.0 with one found to be under V2.0 or later, some under MIT and some have dual license. There are some files which are potentially harder to classify where we've imported upstream code and those can be handled specifically in later commits. The COPYING file is replaced with LICENSE.X files which contain the full license texts. (Bitbake rev: ff237c33337f4da2ca06c3a2c49699bc26608a6b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: hashserv: Add hash equivalence reference serverJoshua Watt2019-01-081-0/+2
| | | | | | | | | | | | | | Implements a reference implementation of the hash equivalence server. This server has minimal dependencies (and no dependencies outside of the standard Python library), and implements the minimum required to be a conforming hash equivalence server. [YOCTO #13030] (Bitbake rev: 1bb2ad0b44b94ee04870bf3f7dac4e663bed6e4d) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/persist_data: Add testsJoshua Watt2018-12-261-0/+1
| | | | | | | | | | | Adds a test suite for testing the persistent data cache [YOCTO #13030] (Bitbake rev: 96a4155049e834af17069d981cc2215e50d18c1a) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker.py: Fix incorrect bb files matched warningMark Hatle2018-09-051-0/+1
| | | | | | | | | | | | | | | | | | | | In the case of a sublayer of an existing layer, where the sublayer and main layer share a path, the system may not match the paths properly resulting in: No bb files matched BBFILE_PATTERN_sublayer '^/path/main/sublayer' because it has already matched the main layer. Fix this issue by sorting the collection items based on the pattern, using longest to shortest. Obviously regex wildcards could still be an issue but these are typically not used, so this simply fix should work in the existing cases. (Bitbake rev: 1787cef7221b88f6920ea70fadaffc117d84c7aa) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: layerindexlib: Initial layer index processing module implementationMark Hatle2018-08-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | The layer index module is expected to be used by various parts of the system in order to access a layerindex-web (such as layers.openembedded.org) and perform basic processing on the information, such as dependency scanning. Along with the layerindex implementation are associated tests. The tests properly honor BB_SKIP_NETTESTS='yes' to prevent test failures. Tests Implemented: - Branch, LayerItem, LayerBranch, LayerDependency, Recipe, Machine and Distro objects - LayerIndex setup using the layers.openembedded.org restapi - LayerIndex storing and retrieving from a file - LayerIndex verify dependency resolution ordering - LayerIndex setup using simulated cooker data (Bitbake rev: fd0ee6c10dbb5592731e56f4c592fe687682a3e6) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-selftest: add bb.tests.event to bitbake-selftestJair Gonzalez2017-06-231-0/+1
| | | | | | | | | | | | | Tests for bitbake event module were created on bb.tests.event. This change is to include them on the default test list in bitbake-selftest script. [YOCTO #10368] (Bitbake rev: 22cc318be1aff16f1b653ff0650fe71d0e9f60bb) Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-selftest: enable bitbake logging to stdoutMarkus Lehtonen2016-08-201-1/+19
| | | | | | | | | | | Now you get the bb logger output for failed tests. This helps debugging problems. Also, all stdout/stderr data for successful tests is silenced which makes for less cluttered console output. (Bitbake rev: ea19972a16f7639f944823d1d8a7728105460136) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-selftest: introduce BB_TMPDIR_NOCLEANMarkus Lehtonen2016-08-201-0/+1
| | | | | | | | | | Set this env variable to 'yes' to preserve temporary directories used by the fetcher tests. Useful for debugging tests. (Bitbake rev: 04132b261df9def3a0cff14c93c29b26ff906e8b) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-selftest: add help text for env variable(s)Markus Lehtonen2016-08-201-1/+13
| | | | | | | (Bitbake rev: 94c63a5b1e731e64eb8efbc09f2ab6a0ce11df05) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-selftest: utilize unittest.main betterMarkus Lehtonen2016-08-201-22/+8
| | | | | | | | | | | This simplifies the script, and, gives new features. It is now possible to run single test functions, for example. This is nice when writing new test cases. (Bitbake rev: 8c513580b9406b031674f799117eae7410f8e01c) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Convert to python 3Richard Purdie2016-06-021-1/+1
| | | | | | | | | 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: bitbake-selftest: Add -v option for verbosityRichard Purdie2015-07-231-5/+10
| | | | | | | | Also document BB_SKIP_NETTESTS=yes parameter in --help output. (Bitbake rev: 5196bfa9639eed2b1e6452f45775551203f8eeb4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/parse: Add very basic start of parse testsRichard Purdie2015-05-151-0/+1
| | | | | | | | | This tests very basic usage of the parser and then adds a test to ensure that incomplete functions raise an exception. (Bitbake rev: b7bcef141b56fe8eb03724ea5251e3251fc63817) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-selftest: fix help message to include command linePaul Eggleton2014-04-091-1/+1
| | | | | | | (Bitbake rev: 3016af554d9cc67aec2429b96d8d085b88315e77) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-selftest: enable specifying tests to run on command linePaul Eggleton2014-02-281-5/+16
| | | | | | | | | | | | | | | | | If you are just trying to fix one test at a time, it can be useful to be able to specify an individual test(s) rather than running them all: bitbake-selftest bb.tests.codeparser bb.tests.cow You can even specify the test class or function to run, e.g.: bitbake-selftest bb.tests.fetch.URITest bitbake-selftest bb.tests.fetch.FetcherNetworkTest.test_fetch (Bitbake rev: 4df9c72663e972437131a848e6ddcf3769ae1d2b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Fixup bitbake-selftestRichard Purdie2012-05-041-0/+0
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Add start of bitbake regression/self testingRichard Purdie2012-05-041-0/+38
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>