diff options
| author | Antonin Godard <antonin.godard@bootlin.com> | 2025-03-25 10:20:45 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-27 15:25:05 +0000 |
| commit | 7e822e13de6b85e156d3508f076f580e63dda01e (patch) | |
| tree | fff3b281882f907040d09df2dc9b5906d1c43198 /documentation | |
| parent | 498666694ff22d3d851d429f760fb5504a8995af (diff) | |
| download | poky-7e822e13de6b85e156d3508f076f580e63dda01e.tar.gz | |
ref-manual/classes.rst: document the ptest-python-pytest class and variables
Add documentation for the ptest-python-pytest class, and the
PTEST_PYTEST_DIR variable which can be overriden.
(From yocto-docs rev: 1abee62c2b9f32dfa42782893940f211db930b4c)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
| -rw-r--r-- | documentation/ref-manual/classes.rst | 15 | ||||
| -rw-r--r-- | documentation/ref-manual/variables.rst | 10 |
2 files changed, 25 insertions, 0 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index 6797927fe8..8b930fe3d2 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst | |||
| @@ -2707,6 +2707,21 @@ For information on setting up and running ptests, see the | |||
| 2707 | ":ref:`test-manual/ptest:testing packages with ptest`" | 2707 | ":ref:`test-manual/ptest:testing packages with ptest`" |
| 2708 | section in the Yocto Project Development Tasks Manual. | 2708 | section in the Yocto Project Development Tasks Manual. |
| 2709 | 2709 | ||
| 2710 | .. _ref-classes-ptest-python-pytest: | ||
| 2711 | |||
| 2712 | ``ptest-python-pytest`` | ||
| 2713 | ======================= | ||
| 2714 | |||
| 2715 | The :ref:`ref-classes-ptest-python-pytest` class can be used in Python-based | ||
| 2716 | recipes to automatically configure the :ref:`ref-classes-ptest` class for Python | ||
| 2717 | packages leveraging the `pytest <https://docs.pytest.org>`__ unit test framework. | ||
| 2718 | |||
| 2719 | Within the recipe, the :term:`PTEST_PYTEST_DIR` variable can be overridden to | ||
| 2720 | specify the path to the directory containing the tests (default value: | ||
| 2721 | ``tests``). Test contained in this directory are installed in :term:`D` by the | ||
| 2722 | :ref:`ref-tasks-install_ptest_base` task, as well as a specific ``run-ptest`` | ||
| 2723 | script for this task. | ||
| 2724 | |||
| 2710 | .. _ref-classes-python3-dir: | 2725 | .. _ref-classes-python3-dir: |
| 2711 | 2726 | ||
| 2712 | ``python3-dir`` | 2727 | ``python3-dir`` |
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 41bda5d0d6..8e0833bff4 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
| @@ -7110,6 +7110,16 @@ system and gives an overview of their function and contents. | |||
| 7110 | at build time should be done by adding "ptest" to (or removing it | 7110 | at build time should be done by adding "ptest" to (or removing it |
| 7111 | from) :term:`DISTRO_FEATURES`. | 7111 | from) :term:`DISTRO_FEATURES`. |
| 7112 | 7112 | ||
| 7113 | :term:`PTEST_PYTEST_DIR` | ||
| 7114 | Within the :ref:`ref-classes-ptest-python-pytest` class, the | ||
| 7115 | :term:`PTEST_PYTEST_DIR` variable represents the path within the source | ||
| 7116 | tree of a Python package holding the unit tests to be tested with the | ||
| 7117 | `pytest <https://docs.pytest.org>`__ framework. The default value for this | ||
| 7118 | variable is ``tests``. | ||
| 7119 | |||
| 7120 | For more information, see | ||
| 7121 | the :ref:`ref-classes-ptest-python-pytest` class documentation. | ||
| 7122 | |||
| 7113 | :term:`PV` | 7123 | :term:`PV` |
| 7114 | The version of the recipe. The version is normally extracted from the | 7124 | The version of the recipe. The version is normally extracted from the |
| 7115 | recipe filename. For example, if the recipe is named | 7125 | recipe filename. For example, if the recipe is named |
