doc: improve BitBake README testing instructions
PATCH 1/1 doc: improve BitBake README testing instructions
Clarified the testing section by:
- Adding context on setting PATH before running selftests
- Documenting how to install pytest using pip
- Providing an example command for running pytest on lib/bb/tests
These additions make it easier for new contributors to run the testsuite and ensure consistent testing practices.
--- bitbake/README | 7 +++++++ 1 file changed, 7 insertions(+)
bitbake/README +7 -0
@@ -54,10 +54,17 @@ The assumption is made that this testsuite is run from an initialized OpenEmbedd environment (i.e. `source oe-init-build-env` is used). If this is not the case, run the testsuite as follows: +# ensure local tools are on PATH and run the selftest script 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): +# install pytest into a virtualenv or pipx (recommended) +python -m pip install --user pytest + +# run tests (example) +python -m pytest lib/bb/tests -q + pytest
Signature · 1 line
2.34.1
PATCH 1/1 doc: improve BitBake README testing instructions
Clarified the testing section by:
- Adding context on setting PATH before running selftests
- Documenting how to install pytest using pip
- Providing an example command for running pytest on lib/bb/tests
These additions make it easier for new contributors to run the testsuite and ensure consistent testing practices.
--- bitbake/README | 7 +++++++ 1 file changed, 7 insertions(+)
bitbake/README +7 -0
@@ -54,10 +54,17 @@ The assumption is made that this testsuite is run from an initialized OpenEmbedd environment (i.e. `source oe-init-build-env` is used). If this is not the case, run the testsuite as follows: +# ensure local tools are on PATH and run the selftest script 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): +# install pytest into a virtualenv or pipx (recommended) +python -m pip install --user pytest + +# run tests (example) +python -m pytest lib/bb/tests -q + pytest
Signature · 1 line
2.34.1
Hi,
Quoted 18 lines · Mohamed Ayman via lists.openembedded.org
Clarified the testing section by:
- Adding context on setting PATH before running selftests
- Documenting how to install pytest using pip
- Providing an example command for running pytest onlib/bb/testsThese additions make it easier for new contributors to run the testsuite and ensure consistent testing practices.
Signed-off-by Mohamed Ayman <[email protected]>--- bitbake/README | 7 +++++++ 1 file changed, 7 insertions(+)bitbake/README +0
-0
bitbake/README The assumption is made that this testsuite is run from an initialized OpenEmbedd · line 57
Quoted 4 lines
bitbake/README +1
-0@@ -54,10 +54,17 @@ The assumption is made that this testsuite is run from an initialized OpenEmbedd environment (i.e. `source oe-init-build-env` is used). If this is not the case, run the testsuite as follows: +# ensure local tools are on PATH and run the selftest script
This should probably be aligned to "export PATH=$(pwd)/bin:$PATH" below?
# ensure local tools are on PATH and run the selftest script
export PATH=$(pwd)/bin:$PATH
bin/bitbake-selftestbitbake/README The assumption is made that this testsuite is run from an initialized OpenEmbedd · line 68
Quoted 11 lines
bitbake/README +5
-0export 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): +# install pytest into a virtualenv or pipx (recommended) +python -m pip install --user pytest + +# run tests (example) +python -m pytest lib/bb/tests -q
Same comment as the one above.
Otherwise, how does this differ from simply running "pytest"?
I tried this and it gave:
$ python -m pytest lib/bb/tests -q
no tests ran in 0.10s
I'm not sure this does anything?
Instead running for example "python -m pytest lib/bb/tests/color.py" works, so if the intent was to showcase how to run tests separately, I would rather showcase an example like this.
Antonin
--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com