From e2e8cecc304d0fd3b71ee3d35d0599db7f8829f6 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 19 Aug 2019 18:40:25 +0200 Subject: [PATCH] pm3test: show output in case of failure --- pm3test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pm3test.sh b/pm3test.sh index 071cecaea..ac0624fdf 100755 --- a/pm3test.sh +++ b/pm3test.sh @@ -37,7 +37,8 @@ function CheckExecute() { for I in $RETRY do - if eval "$2 | grep -q '$3'"; then + RES=$(eval "$2") + if echo "$RES" | grep -q "$3"; then echo -e "$1 ${C_GREEN}[OK]${C_NC}" return 0 fi @@ -51,6 +52,7 @@ function CheckExecute() { fi echo -e "$1 ${C_RED}[Fail]${C_NC}" + echo -e "Execution trace:\n$RES" return 1 }