[PATCH RFC next 01/18] test/py: add pytest --make-args argument for additional Make arguments

Simon Glass sjg at chromium.org
Mon May 4 22:30:08 CEST 2026


On 2026-05-04T13:20:27, Quentin Schulz <foss+uboot at 0leil.net> wrote:
> test/py: add pytest --make-args argument for additional Make arguments
>
> We manually execute make commands within some tests, sometimes from
> 'dirty' build directories.
>
> One example is the test_env_initial_env_file test which calls
> make u-boot-initial-env
> in a build directory that has already been populated possibly before
> pytest is run (which is the case in our GitLab CI/CD).
>
> In "sandbox with clang test.py" and "sandbox64 with clang test.py" we
> build before pytest with clang-20 but pytest will call make without
> setting HOSTCC or CC to clang-20, which results in clang flags being
> used with gcc. Right now, it isn't triggering a build issue because we
> use cc-disable-warning to disable the warning only if it's available, so
> the clang flags aren't added. However, in a few commits we'll bump
> scripts/Makefile.extrawarn to a newer version from the Linux kernel
> (6.1) and it won't be used anymore, thus triggering fails.
>
> Add an option to specify make arguments such that a user can provide
> HOSTCC and CC for when the build directory to reuse has been built with
> clang.
>
> Signed-off-by: Quentin Schulz <quentin.schulz at cherry.de>
>
> test/py/conftest.py                 | 6 ++++--
>  test/py/tests/test_cleanup_build.py | 4 ++--
>  test/py/tests/test_env.py           | 4 ++--
>  3 files changed, 8 insertions(+), 6 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list