test/py: add test of setenv/printenv/echo

This tests basic environment variable functionality.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Stephen Warren 2016-01-15 11:15:26 -07:00 committed by Simon Glass
parent 472040d5cb
commit 5ab097abad
2 changed files with 221 additions and 4 deletions

View file

@ -20,10 +20,6 @@ static int do_ut_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
printf("%s: Testing commands\n", __func__);
run_command("env default -f -a", 0);
/* run a single command */
run_command("setenv single 1", 0);
assert(!strcmp("1", getenv("single")));
/* make sure that compound statements work */
#ifdef CONFIG_SYS_HUSH_PARSER
run_command("if test -n ${single} ; then setenv check 1; fi", 0);