[PATCH 2/2] doc: pytest: add missing hook script env vars

David Lechner dlechner at baylibre.com
Tue Nov 25 01:04:47 CET 2025


On 11/24/25 5:53 PM, Heinrich Schuchardt wrote:
> On 11/24/25 23:44, David Lechner wrote:
>> Add the _EXTRA variants of U_BOOT_BUILD_DIR and U_BOOT_RESULT_DIR to the
>> list of environment variables set for hook scripts.
>>
>> These were added in commit 8f2a9fa7d6e7 ("test: Support testing with two
>> board-builds") but were not documented.
>>
>> Signed-off-by: David Lechner <dlechner at baylibre.com>
>> ---
>>   doc/develop/pytest/usage.rst | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/doc/develop/pytest/usage.rst b/doc/develop/pytest/usage.rst
>> index 7c42a31528fd0ef78d3e24f65ee86ce2d61d6e87..df3821da20dd6e4199947a594e5e2eb2198e6e6d 100644
>> --- a/doc/develop/pytest/usage.rst
>> +++ b/doc/develop/pytest/usage.rst
>> @@ -316,11 +316,13 @@ Environment variables
>>   The following environment variables are set when running hook scripts:
>>     - ``U_BOOT_BOARD_TYPE`` the board type being tested.
>> +- ``U_BOOT_BOARD_TYPE_EXTRA`` the 2nd board type being tested, if applicable.
> 
> I cannot find the two strings above in U-Boot. The mentioned patch adds 'board_type_extra'. Where is U_BOOT_ prepended to the capitalized string?
> 
Same answer as the other patch, it comes from:

    env_vars = (
        'board_type',
        'board_type_extra',
        'board_identity',
        'source_dir',
        'test_py_dir',
        'build_dir',
        'build_dir_extra',
        'result_dir',
        'persistent_data_dir',
    )
    for v in env_vars:
        os.environ['U_BOOT_' + v.upper()] = getattr(ubconfig, v)

in test/py/conftest.py (around line 340).



More information about the U-Boot mailing list