提交 3e229a83 编写于 作者: S Stephen Warren 提交者: Michal Simek

test/py: Setup variables based on HUSH selection

After adding our small zynq uboot which has hush parser off same
variable tests start to failed. Use quotes only when hush is enabled.
Reported-by: NMichal Simek <michal.simek@xilinx.com>
Signed-off-by: NStephen Warren <swarren@nvidia.com>
上级 ec60a279
......@@ -125,7 +125,16 @@ def set_var(state_test_env, var, value):
Nothing.
"""
state_test_env.u_boot_console.run_command('setenv %s "%s"' % (var, value))
bc = state_test_env.u_boot_console.config.buildconfig
if bc.get('config_hush_parser', None):
quote = '"'
else:
quote = ''
if ' ' in value:
pytest.skip('Space in variable value on non-Hush shell')
state_test_env.u_boot_console.run_command(
'setenv %s %s%s%s' % (var, quote, value, quote))
state_test_env.env[var] = value
def validate_empty(state_test_env, var):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册