Browse Source

test: do no assume hush parser in validate_empty()

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@gmx.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Heinrich Schuchardt 3 years ago
parent
commit
185440ffc4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      test/py/tests/test_env.py

+ 1 - 1
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):