diff options
author | Tom Rini <trini@konsulko.com> | 2023-05-04 11:49:30 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-05-04 11:49:30 -0400 |
commit | 7f30eec1779b8f641b9563a1dab6a6865916ec01 (patch) | |
tree | 9d0b296416d6820d45cfa24bdebe1ef81ef44b1c /test/py | |
parent | bfce695104d59a8570ce0a7cbd75d3728117eb5d (diff) | |
parent | 0d734df4a459f01fdf1e62512fb28b28022cb6a9 (diff) | |
download | u-boot-7f30eec1779b8f641b9563a1dab6a6865916ec01.tar.gz u-boot-7f30eec1779b8f641b9563a1dab6a6865916ec01.tar.bz2 u-boot-7f30eec1779b8f641b9563a1dab6a6865916ec01.zip |
Merge branch '2023-05-03-assorted-updates-and-fixes'
- Various typo fixes, pass -Werror to host tools builds, bdi cleanups,
fix hush and local variables, a FSL PCI fix and correct some python in
one of the tests.
Diffstat (limited to 'test/py')
-rw-r--r-- | test/py/tests/test_hush_if_test.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/py/tests/test_hush_if_test.py b/test/py/tests/test_hush_if_test.py index 37c1608bb2..3b4b6fcaf4 100644 --- a/test/py/tests/test_hush_if_test.py +++ b/test/py/tests/test_hush_if_test.py @@ -182,3 +182,16 @@ def test_hush_if_test_host_file_exists(u_boot_console): expr = 'test -e hostfs - ' + test_file exec_hush_if(u_boot_console, expr, False) + +def test_hush_var(u_boot_console): + """Test the set and unset of variables""" + u_boot_console.run_command('ut_var_nonexistent=') + u_boot_console.run_command('ut_var_exists=1') + u_boot_console.run_command('ut_var_unset=1') + exec_hush_if(u_boot_console, 'test -z "$ut_var_nonexistent"', True) + exec_hush_if(u_boot_console, 'test -z "$ut_var_exists"', False) + exec_hush_if(u_boot_console, 'test -z "$ut_var_unset"', False) + exec_hush_if(u_boot_console, 'ut_var_unset=', True) + exec_hush_if(u_boot_console, 'test -z "$ut_var_unset"', True) + u_boot_console.run_command('ut_var_exists=') + u_boot_console.run_command('ut_var_unset=') |