summaryrefslogtreecommitdiff
path: root/doc/develop/pytest
AgeCommit message (Collapse)Author
2025-05-18test: allow multiple config options in buildconfigspecHeinrich Schuchardt
In some cases we have alternative configuration options that supply the same functionality, e.g CONFIG_NET and CONFIG_NET_LWIP. Allow to specify all of them as arguments for buildconfigspec() and execute the text if any of these is fulfilled, e.g. @pytest.mark.buildconfigspec('net', 'net_lwip') Update the documentation. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-05-18doc: pytest: Use globing for test filesTom Rini
After the original series was merged, Quentin noted that we could handle adding additional tests more easily by using the glob feature. Do so. Suggested-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-05-11doc: pytest: Document the test_button testTom Rini
Add this test to the documentation. No changes to the test itself were required. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-05-11doc: pytest: Document the test_bootmenu testTom Rini
Add this test to the documentation. There was already a function comment that included the argument, so convert it to the right style to be rendered correctly in output. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-05-11doc: pytest: Document the test_bind testTom Rini
Add this test to the documentation. None of the functions had comments, so attempt to explain what each does. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-05-11doc: pytest: Document the test_efi_loader testTom Rini
Add this test to the documentation. We need to add a code-block annotation to the example and indent it correctly. We also need to document the do_test_efi_helloworld_net function and that in turn means changing the documentation to test_efi_helloworld_net_http and test_efi_helloworld_net_tftp to reflect what is and isn't done in those functions themselves now. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-05-11doc: pytest: Document the test_bootstage testTom Rini
Add this test to the documentation. We need to move the import to follow the main comment so that it renders correctly, and add a code-block annotation to the example and indent it correctly. Next, neither of the functions had comments themselves, so document them now. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-05-11doc: pytest: Document the test_net testTom Rini
Add this test to the documentation. While the diff appears large at first, the only changes within the test are to move the imports to follow the pydoc comment and then to code-block and indent the example configuration. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-05-11doc: pytest: Document the test_net_boot testTom Rini
Add the test_net_boot.py test to the generated documentation. While most of this was already commented correctly for inclusion the biggest problem was examples of code without a code-block notation. This in turn broke parsing. Add the missing notations. We also must have the comment prior to any import lines or it will not be seen as a comment on the overall file and thus not included. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-05-11doc: pytest: Framework for documenting tests and document test_000_versionTom Rini
In order to easily document pytests, we need to include the autodoc extension. We also need to make sure that for building the docs, CI includes pytest and that we have PYTHONPATH configured such that it will find all of the tests and related files. Finally, we need to have our comments in the test file by in proper pydoc format in order to be included in the output. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2025-05-11doc: Start improving our pytest documentationTom Rini
Begin the work of documenting all of our pytests. To do this, we should have a directory under develop for it as there will be a large number of new files. As the current document is referenced externally in a number of locations, add the sphinx_reredirects module so that we can redirect from the old location to the new. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>