Skip to content
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

Add pytest plugin #57117

Merged
merged 5 commits into from
May 26, 2023
Merged

Add pytest plugin #57117

merged 5 commits into from
May 26, 2023

Commits on May 26, 2023

  1. scripts: add pytest plugin

    Adding pytest plugin dedicated to running pytest tests in Zephyr
    project. This plugin provides a dut fixture which allows to handle
    bidirectional communication with the device under test. This version
    of plugin can be used for tests dedicated to real hardware, QEMU and
    native_posix simulator.
    
    Co-authored-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
    Co-authored-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
    Co-authored-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
    Signed-off-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
    4 people committed May 26, 2023
    Configuration menu
    Copy the full SHA
    3343535 View commit details
    Browse the repository at this point in the history
  2. scripts: twister: adaptation for pytest plugin

    Making the necessary changes to enable the new pytest plugin.
    By default Twister should work without the pytest-twister-harness
    plugin installed. To achieve this, each time Twister calls pytest,
    the PYTHONPATH environment variable is expanded and the
    `-p twister_harness.plugin` option is added to the pytest command.
    
    Co-authored-by: Piotr Golyzniak <piotr.golyzniak@nordicsemi.no>
    Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
    gchwier and gopiotr committed May 26, 2023
    Configuration menu
    Copy the full SHA
    0076ef5 View commit details
    Browse the repository at this point in the history
  3. samples: testsuite: exemplary pytest shell test

    Adding exemplary pytest shell test to show possibilities of new pytest
    plugin. This test uses bidirectional communication between tester and
    device under test.
    
    Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
    gchwier authored and gopiotr committed May 26, 2023
    Configuration menu
    Copy the full SHA
    abd9af1 View commit details
    Browse the repository at this point in the history
  4. ci: twister: add unit tests for pytest plugin

    Adding a stage to twister unit test workflow where tests for
    pytest-twister-harness plugin are executed.
    
    Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
    PerMac authored and gopiotr committed May 26, 2023
    Configuration menu
    Copy the full SHA
    5f12124 View commit details
    Browse the repository at this point in the history
  5. doc: twister: add documentation for pytest plugin

    Adding documentation for integration of twister with pytest plugin.
    
    Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
    PerMac authored and gopiotr committed May 26, 2023
    Configuration menu
    Copy the full SHA
    a669b35 View commit details
    Browse the repository at this point in the history