u-boot/test/py
Simon Glass 86b9c3e4e4 env: Allow U-Boot scripts to be placed in a .env file
At present U-Boot environment variables, and thus scripts, are defined
by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text
to this file and dealing with quoting and newlines is harder than it
should be. It would be better if we could just type the script into a
text file and have it included by U-Boot.

Add a feature that brings in a .env file associated with the board
config, if present. To use it, create a file in a board/<vendor>
directory, typically called <board>.env and controlled by the
CONFIG_ENV_SOURCE_FILE option.

The environment variables should be of the form "var=value". Values can
extend to multiple lines. See the README under 'Environment Variables:'
for more information and an example.

In many cases environment variables need access to the U-Boot CONFIG
variables to select different options. Enable this so that the environment
scripts can be as useful as the ones currently in the board config files.
This uses the C preprocessor, means that comments can be included in the
environment using /* ... */

Also support += to allow variables to be appended to. This is needed when
using the preprocessor.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Marek Behún <marek.behun@nic.cz>
2021-11-16 14:35:08 -05:00
..
tests env: Allow U-Boot scripts to be placed in a .env file 2021-11-16 14:35:08 -05:00
.gitignore test/py: Implement pytest infrastructure 2016-01-20 19:06:23 -07:00
conftest.py test/py: improve regular expression for ut subtest symbol matcher 2021-05-24 14:21:30 -04:00
multiplexed_log.css SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
multiplexed_log.py test/py: Manual python3 fixes 2019-10-30 17:48:47 -04:00
pytest.ini test/py: Manual python3 fixes 2019-10-30 17:48:47 -04:00
requirements.txt tests: patman: Add requests to the module list 2021-04-29 03:23:39 -07:00
test.py pytest: Shorten traceback length by default 2021-10-14 19:45:07 -04:00
u_boot_console_base.py serial: Rename SERIAL_SUPPORT to SERIAL 2021-09-04 12:26:01 -04:00
u_boot_console_exec_attach.py SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
u_boot_console_sandbox.py test/py: Add a way to pass flags to sandbox 2018-11-26 08:25:35 -05:00
u_boot_spawn.py pytest: Show a message when sandbox crashes 2021-10-14 19:45:07 -04:00
u_boot_utils.py test/py: Wait for guestmount worker to exit after running guestunmount 2021-07-05 15:28:32 -04:00