Skip to contentSkip to conversation

test: do no assume hush parser in validate_empty()

PATCH New Heinrich Schuchardt 3 participants 3 messages Sep 10, 2020 – Sep 14, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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}.

---
 test/py/tests/test_env.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/py/tests/test_env.py +1 -1
index 2ae8f25381..940279651d 100644
@@ -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

#1 lore raw

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

Quoted 3 lines · Heinrich Schuchardt

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}.

#2 lore raw

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

In reply to Heinrich Schuchardt
Quoted 6 lines · Heinrich Schuchardt

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}.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200914/e7e396f4/attachment.sig>