[PATCH 1/1] test: do no assume hush parser in validate_empty()

Heinrich Schuchardt xypron.glpk at gmx.de
Thu Sep 10 12:09:03 CEST 2020


The environment variable test uses function validate_empty() to check that
a variable is not defined. If the hush parser is not enabled, we cannot
refer to a variable by $var_name but only by ${var_name}.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 test/py/tests/test_env.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py
index 2ae8f25381..940279651d 100644
--- a/test/py/tests/test_env.py
+++ b/test/py/tests/test_env.py
@@ -151,7 +151,7 @@ def validate_empty(state_test_env, var):
         Nothing.
     """

-    response = state_test_env.u_boot_console.run_command('echo $%s' % var)
+    response = state_test_env.u_boot_console.run_command('echo ${%s}' % var)
     assert response == ''

 def validate_set(state_test_env, var, value):
--
2.28.0



More information about the U-Boot mailing list