poky/bitbake
Peter Hoyes e08025fe4c bitbake: bitbake: Bootstrap pytest for self-tests
To support running the bitbake self-tests using pytest, add a
pytest.ini This enables these tests to be run using the following
command from the bitbake directory.

  pytest

For now, testpaths only includes the bitbake selftests.

Add a note to the README.

(Bitbake rev: 79bc14003000ab439262272dae6a99961f7c14c7)

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-06-27 15:28:56 +01:00
..
bin bitbake: cooker: Add FILE_LAYERNAME variable containing the layername for a recipe 2023-05-25 13:16:24 +01:00
contrib bitbake: contrib: Add Dockerfile for building PR service 2022-03-23 12:08:56 +00:00
doc bitbake: docs: bitbake-user-manual: bitbake-user-manual-hello: add links and highlights for variables 2023-06-24 12:22:27 +01:00
lib bitbake: bitbake: tests: Use assertLogs to test logging output 2023-06-27 15:28:56 +01:00
.gitattributes bitbake: .gitattributes: Add to improve git diff for minified css/js files 2019-03-07 12:18:48 +00:00
AUTHORS misc: Update the email address to a working one. 2011-01-04 14:36:54 +00:00
ChangeLog *: Fix typo in documentation 2010-08-04 16:12:39 +01:00
LICENSE bitbake: bitbake: Add initial pass of SPDX license headers to source code 2019-05-04 10:44:04 +01:00
LICENSE.GPL-2.0-only bitbake: bitbake: Add initial pass of SPDX license headers to source code 2019-05-04 10:44:04 +01:00
LICENSE.MIT bitbake: bitbake: Add initial pass of SPDX license headers to source code 2019-05-04 10:44:04 +01:00
README bitbake: bitbake: Bootstrap pytest for self-tests 2023-06-27 15:28:56 +01:00
toaster-requirements.txt bitbake: toaster-requirements.txt: Django 3.2 LTS 2022-03-15 08:40:09 +00:00

Bitbake

BitBake is a generic task execution engine that allows shell and Python tasks to be run efficiently and in parallel while working within complex inter-task dependency constraints. One of BitBake's main users, OpenEmbedded, takes this core and builds embedded Linux software stacks using a task-oriented approach.

For information about Bitbake, see the OpenEmbedded website: https://www.openembedded.org/

Bitbake plain documentation can be found under the doc directory or its integrated html version at the Yocto Project website: https://docs.yoctoproject.org

Bitbake requires Python version 3.8 or newer.

Contributing

Please refer to https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded for guidelines on how to submit patches, just note that the latter documentation is intended for OpenEmbedded (and its core) not bitbake patches (bitbake-devel@lists.openembedded.org) but in general main guidelines apply. Once the commit(s) have been created, the way to send the patch is through git-send-email. For example, to send the last commit (HEAD) on current branch, type:

git send-email -M -1 --to bitbake-devel@lists.openembedded.org

Mailing list:

https://lists.openembedded.org/g/bitbake-devel

Source code:

https://git.openembedded.org/bitbake/

Testing

Bitbake has a testsuite located in lib/bb/tests/ whichs aim to try and prevent regressions. You can run this with "bitbake-selftest". In particular the fetcher is well covered since it has so many corner cases. The datastore has many tests too. Testing with the testsuite is recommended before submitting patches, particularly to the fetcher and datastore. We also appreciate new test cases and may require them for more obscure issues.

To run the tests "zstd" and "git" must be installed.

The assumption is made that this testsuite is run from an initialized OpenEmbedded build environment (i.e. source oe-init-build-env is used). If this is not the case, run the testsuite as follows:

export PATH=$(pwd)/bin:$PATH
bin/bitbake-selftest

The testsuite can alternatively be executed using pytest, e.g. obtained from PyPI (in this case, the PATH is configured automatically):

pytest