-
Notifications
You must be signed in to change notification settings - Fork 827
Description
I am working on an embedded device using the warrior branch of meta-openembedded. I've written a few Python modules and I wanted to incorporate the pytest results into the Yocto build (i.e. fail the build if pytest failed). My experience was that I needed to change python3-pytest to run it natively for the testing. The changes were pulled from meta-sca.
I am running the tests using the following code in my recipes:
DEPENDS += "python3-pytest-native python3-pip-native"
do_run_testsuite(){
pip3 install ${WORKDIR}/git
python3 -m pytest -v ${WORKDIR}/git/tests
}
addtask do_run_testsuite before do_install after do_configure
To get this to work, I had to add the following to the python3-pytest recipe:
DEPENDS += "\
${PYTHON_PN}-attrs-native \
${PYTHON_PN}-pluggy-native \
${PYTHON_PN}-py-native \
${PYTHON_PN}-six-native \
"
I then had to modify the recipes for python3-attrs and python3-pluggy to include so they could be run natively:
BBCLASSEXTEND = "native"
I see that python3-attrs had been changed to support running natively in master, but python3-pluggy does not have this change.
What should change in python3-pytest to support running it natively? I pulled the DEPENDS change from meta-sca, but I do not have enough knowledge here to suggest the final change. Thanks.