summaryrefslogtreecommitdiff
path: root/doc/develop/pytest/usage.rst
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-05-18 08:06:56 -0600
committerTom Rini <[email protected]>2025-05-18 08:06:56 -0600
commiteeb5ff1a468b2303efa9deb2483b5edbebb568c6 (patch)
tree52d32503af86d214a4bece8b6093393e521e345d /doc/develop/pytest/usage.rst
parent126a88d49bcae04bbfc0d6723097cd6341355ade (diff)
parent22abd882c3de2eb365d4c503246c9c7499d4c7f1 (diff)
Merge tag 'efi-2025-07-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2025-07-rc3-2 Documentation: * Add test/py/requirements.txt to documentation * Use globing for selecting pytest files UEFI: * Provide a function to disable ANSI output during tests Other: * test: allow multiple config options in buildconfigspec * test: allow testing with NET_LWIP=y
Diffstat (limited to 'doc/develop/pytest/usage.rst')
-rw-r--r--doc/develop/pytest/usage.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/develop/pytest/usage.rst b/doc/develop/pytest/usage.rst
index 49d269d66a7..779b2dbe24b 100644
--- a/doc/develop/pytest/usage.rst
+++ b/doc/develop/pytest/usage.rst
@@ -522,3 +522,27 @@ of the `ubman.config` object, for example
Build configuration values (from `.config`) may be accessed via the dictionary
`ubman.config.buildconfig`, with keys equal to the Kconfig variable
names.
+
+A required configuration setting can be defined via a buildconfigspec()
+annotation. The name of the configuration option is specified in lower case. The
+following annotation for a test requires CONFIG_EFI_LOADER=y:
+
+.. code-block:: python
+
+ @pytest.mark.buildconfigspec('efi_loader')
+
+Sometimes multiple configuration option supply the same functionality. If
+multiple arguments are passed to buildconfigspec(), only one of the
+configuration options needs to be set. The following annotation requires that
+either of CONFIG_NET or CONFIG_NET_LWIP is set:
+
+.. code-block:: python
+
+ @pytest.mark.buildconfigspec('net', 'net lwip')
+
+The notbuildconfigspec() annotation can be used to require a configuration
+option not to be set. The following annotation requires CONFIG_RISCV=n:
+
+.. code-block:: python
+
+ @pytest.mark.notbuildconfigspec('riscv')