* [U-Boot] [PATCH] unit-test: clean up evironment after Hush tests
@ 2014-02-28 5:01 Stephen Warren
2014-03-02 0:12 ` Simon Glass
2014-03-07 22:27 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Stephen Warren @ 2014-02-28 5:01 UTC (permalink / raw)
To: u-boot
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: Stephen Warren <swarren@wwwdotorg.org>
---
test/command_ut.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/test/command_ut.c b/test/command_ut.c
index 56041e9..b6b6976 100644
--- a/test/command_ut.c
+++ b/test/command_ut.c
@@ -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);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] unit-test: clean up evironment after Hush tests
2014-02-28 5:01 [U-Boot] [PATCH] unit-test: clean up evironment after Hush tests Stephen Warren
@ 2014-03-02 0:12 ` Simon Glass
2014-03-07 22:27 ` [U-Boot] " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2014-03-02 0:12 UTC (permalink / raw)
To: u-boot
On 27 February 2014 22:01, Stephen Warren <swarren@wwwdotorg.org> wrote:
> 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: Stephen Warren <swarren@wwwdotorg.org>
>
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] unit-test: clean up evironment after Hush tests
2014-02-28 5:01 [U-Boot] [PATCH] unit-test: clean up evironment after Hush tests Stephen Warren
2014-03-02 0:12 ` Simon Glass
@ 2014-03-07 22:27 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2014-03-07 22:27 UTC (permalink / raw)
To: u-boot
On Thu, Feb 27, 2014 at 10:01:28PM -0700, Stephen Warren wrote:
> 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: Stephen Warren <swarren@wwwdotorg.org>
> Acked-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140307/8f7a14c9/attachment.pgp>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-07 22:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-28 5:01 [U-Boot] [PATCH] unit-test: clean up evironment after Hush tests Stephen Warren
2014-03-02 0:12 ` Simon Glass
2014-03-07 22:27 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox