doc: Use sys.path.append for pytests

Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini
2026-03-09 11:27:35 -06:00
parent 2092322b31
commit 9a6dd68323
2 changed files with 3 additions and 2 deletions

View File

@@ -2759,8 +2759,7 @@ DOC_TARGETS := xmldocs latexdocs pdfdocs htmldocs epubdocs cleandocs \
linkcheckdocs dochelp refcheckdocs texinfodocs infodocs
PHONY += $(DOC_TARGETS)
$(DOC_TARGETS): scripts_basic FORCE
$(Q)PYTHONPATH=$(srctree)/test/py/tests:$(srctree)/test/py \
$(MAKE) $(build)=doc $@
$(Q)$(MAKE) $(build)=doc $@
PHONY += checkstack ubootrelease ubootversion

View File

@@ -34,6 +34,8 @@ if os.environ.get("READTHEDOCS", "") == "True":
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('sphinx'))
sys.path.append(os.path.abspath('../test/py/tests'))
sys.path.append(os.path.abspath('../test/py'))
from load_config import loadConfig
# -- General configuration ------------------------------------------------