Skip to content

Dev/pytest plugin #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Dev/pytest plugin #6

wants to merge 27 commits into from

Conversation

PerMac
Copy link
Owner

@PerMac PerMac commented May 25, 2023

No description provided.

gopiotr and others added 24 commits May 23, 2023 17:10
Add initial version of pytest plugin dedicated to run pytest tests in
Zephyr project.

Co-authored-by: Lukasz Fundakowski <[email protected]>
Signed-off-by: Piotr Golyzniak <[email protected]>
Add exemplary shell tests basing on added pytest plugin.

Signed-off-by: Piotr Golyzniak <[email protected]>
Change name of pytest plugin to more meaningful one.

Signed-off-by: Piotr Golyzniak <[email protected]>
Initial work for pytest-twister-ext plugin. Removed legacy pytest
support. Modified Pytest-Harness to generate internal pytest
command for hardware-adapter. Modified logic with HarnessImporter,
getting harness only once in Runner and passing it to proper Handler.

Signed-off-by: Grzegorz Chwierut <[email protected]>
Ported from TwisterV2 logging module.

Co-authored-by: Katarzyna Giadla <[email protected]>
Signed-off-by: Grzegorz Chwierut <[email protected]>
Integrated QemuAdapter from TwisterV2

Co-authored-by: Lukasz Fundakowski <[email protected]>
Signed-off-by: Grzegorz Chwierut <[email protected]>
Integrated SimulatorAdapters from TwisterV2.

Co-authored-by: Lukasz Fundakowski <[email protected]>
Signed-off-by: Grzegorz Chwierut <[email protected]>
Added sample showing interaction with shell.

Signed-off-by: Grzegorz Chwierut <[email protected]>
Some of tests for pytest-twister-ext plugin ported from twisterV2

Co-authored-by: Lukasz Fundakowski <[email protected]>
Signed-off-by: Grzegorz Chwierut <[email protected]>
Fix minor typos, add Apache licenses to the files.

Signed-off-by: Piotr Golyzniak <[email protected]>
Make else if conditional statement simpler.

Signed-off-by: Piotr Golyzniak <[email protected]>
Add possibility to printing pytest output by Twister when it is call
with -vv option.

Signed-off-by: Piotr Golyzniak <[email protected]>
Remove requirements, which are not used in this plugin version.

Signed-off-by: Piotr Golyzniak <[email protected]>
To be able to install plugin in editable mode without egg-link file,
I added this pyproject.toml file to indicate to use only setuptools.

Signed-off-by: Piotr Golyzniak <[email protected]>
When pytest plugin is not installed, then extend pytest command and
export PYTHONPATH during call by Twister.

Co-authored-by: Piotr Golyzniak <[email protected]>
Signed-off-by: Grzegorz Chwierut <[email protected]>
At this moment only hardware, QEMU and native_posix are handled by
pytest plugin so in other cases test should be build only.

Signed-off-by: Piotr Golyzniak <[email protected]>
Add integration platforms to exemplary pytest shell sample.

Signed-off-by: Piotr Golyzniak <[email protected]>
As per Twister maintainer suggestion, name of plugin was renamed from
pytest-twister-ext to pytest-twister-harness.

Signed-off-by: Grzegorz Chwierut <[email protected]>
Enforce on users using by default non-installed plugin version when
they call it by Twister. If they would like to use them intentionally,
then they can use --allow-installed-plugin option.

Signed-off-by: Piotr Golyzniak <[email protected]>
Remove requirements.txt files dedicated for pytest plugin to keep only
one requirements.txt files dedicated for whole Zephyr project.

Signed-off-by: Piotr Golyzniak <[email protected]>
Remove possibility of using additional linters like flake8, isort or
mypy to be aligned with Zephyr/Twister coding standard.

Signed-off-by: Piotr Golyzniak <[email protected]>
Remove information about possibility of installing pytest plugin by
pip.

Signed-off-by: Piotr Golyzniak <[email protected]>
This is an initial documentation for integration of twister with pytest
plugin.

Signed-off-by: Maciej Perkowski <[email protected]>
Was causing compliance issues. This commit will be squashed
before the PR is merged

Signed-off-by: Maciej Perkowski <[email protected]>
@PerMac PerMac force-pushed the dev/pytest_plugin branch from b5cef98 to 2bd9733 Compare May 25, 2023 12:00
The test was incorrect and is removed.

Signed-off-by: Maciej Perkowski <[email protected]>
PerMac added 2 commits May 25, 2023 15:49
As suggested in the review. Will be squashed.

Signed-off-by: Maciej Perkowski <[email protected]>
Add a stage to twister unit test workflow where tests for
pytest-twister-harness are executed.

Signed-off-by: Maciej Perkowski <[email protected]>
@PerMac PerMac force-pushed the dev/pytest_plugin branch from d962898 to 1b6863a Compare May 25, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants