提交 eebd1b58 编写于 作者: S Stephen Warren 提交者: Tom Rini

unit-test: clean up evironment after Hush tests

Delete the temporary variables that are used to save unit-test results
from the environment after running the test. This prevents polluting
the environment, or growing it too much.
Signed-off-by: NStephen Warren <swarren@wwwdotorg.org>
Acked-by: NSimon Glass <sjg@chromium.org>
上级 9a04a858
......@@ -65,7 +65,8 @@ static int do_ut_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
run_command("if test " expr " ; then " \
"setenv " #name "_" #expected_result " y; else " \
"setenv " #name "_" #expected_result " n; fi", 0); \
assert(!strcmp(#expected_result, getenv(#name "_" #expected_result)));
assert(!strcmp(#expected_result, getenv(#name "_" #expected_result))); \
setenv(#name "_" #expected_result, NULL);
/* Basic operators */
HUSH_TEST(streq, "aaa = aaa", y);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册