From: Simon Glass <simon.glass@canonical.com> Currently running './test/py/test.py --help' fails with an error about .config not existing. This is because pytest_configure() tries to parse the build configuration even when just showing help. Add an early return when config.option.help is set, so users can view the help text without needing a build directory. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- test/py/conftest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/py/conftest.py b/test/py/conftest.py index bd0c226276a..8efbe0d01c6 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -239,6 +239,10 @@ def pytest_configure(config): Returns: Nothing. """ + # Skip full configuration when just showing help + if config.option.help: + return + def parse_config(conf_file): """Parse a config file, loading it into the ubconfig container -- 2.43.0