[master] f9b6914 Gracefully fail shell commands in varnishtest
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Jun 17 14:31:17 CEST 2015
commit f9b6914410edd787925a14d22351cdb90063e8cd
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Wed Jun 17 14:29:27 2015 +0200
Gracefully fail shell commands in varnishtest
diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c
index ae38f68..3af21e6 100644
--- a/bin/varnishtest/vtc.c
+++ b/bin/varnishtest/vtc.c
@@ -428,7 +428,7 @@ cmd_shell(CMD_ARGS)
{
(void)priv;
(void)cmd;
- int r;
+ int r, s;
if (av == NULL)
return;
@@ -436,7 +436,11 @@ cmd_shell(CMD_ARGS)
AZ(av[2]);
vtc_dump(vl, 4, "shell", av[1], -1);
r = system(av[1]);
- AZ(WEXITSTATUS(r));
+ s = WEXITSTATUS(r);
+ if (s != 0) {
+ vtc_log(vl, 0, "CMD '%s' failed with status %d",
+ av[1], s);
+ }
}
/**********************************************************************
More information about the varnish-commit
mailing list