From be2bdfd0199f37fed0ce19f90840f79d185e20d1 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 7 May 2025 16:08:17 -0600 Subject: doc: Start improving our pytest documentation 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 Reviewed-by: Simon Glass --- doc/conf.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc/conf.py') diff --git a/doc/conf.py b/doc/conf.py index c50daf874a5..3cb9b2bb65e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -47,7 +47,8 @@ needs_sphinx = '2.4.4' extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'kfigure', 'sphinx.ext.ifconfig', # 'automarkup', 'maintainers_include', 'sphinx.ext.autosectionlabel', - 'kernel_abi', 'kernel_feat', 'sphinx-prompt'] + 'kernel_abi', 'kernel_feat', 'sphinx-prompt', + 'sphinx_reredirects' ] # # cdomain is badly broken in Sphinx 3+. Leaving it out generates *most* @@ -148,6 +149,11 @@ project = 'Das U-Boot' copyright = 'The U-Boot development community' author = 'The U-Boot development community' +# Pages we have moved after being heavily referenced externally +redirects = { + "develop/py_testing": "pytest/usage.html" +} + # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. -- cgit v1.2.3 From a865d1d25410af97376fd3c822bac560b99fd84b Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 7 May 2025 16:08:18 -0600 Subject: doc: pytest: Framework for documenting tests and document test_000_version 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 Reviewed-by: Simon Glass --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/conf.py') diff --git a/doc/conf.py b/doc/conf.py index 3cb9b2bb65e..84d028feda8 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -48,7 +48,7 @@ extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'kfigure', 'sphinx.ext.ifconfig', # 'automarkup', 'maintainers_include', 'sphinx.ext.autosectionlabel', 'kernel_abi', 'kernel_feat', 'sphinx-prompt', - 'sphinx_reredirects' ] + 'sphinx_reredirects', 'sphinx.ext.autodoc' ] # # cdomain is badly broken in Sphinx 3+. Leaving it out generates *most* -- cgit v1.2.3