From 0412c6265c44cec2ce3a9916081227a4047e865b Mon Sep 17 00:00:00 2001 From: cgeoffroy Date: Tue, 11 Apr 2017 10:58:53 +0200 Subject: [PATCH] Print the containernet cli logs when a pattern is missing --- utils/ci/check_manual_usage_example.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/utils/ci/check_manual_usage_example.sh b/utils/ci/check_manual_usage_example.sh index 0c5c32b..e2b1597 100755 --- a/utils/ci/check_manual_usage_example.sh +++ b/utils/ci/check_manual_usage_example.sh @@ -21,9 +21,14 @@ W() { sleep 0.5s done EOF - timeout -k 3s ${T} ${SUBF} "${1}" - local RES=$? + local RES=0 + timeout -k 3s ${T} ${SUBF} "${1}" || RES=$? rm -f ${SUBF} + if [ ! "$RES" = "0" ]; then + sync + printheader "(Debug) Error while waiting for a pattern to appear in screenlog.0" + strings screenlog.0 + fi return ${RES} } -- 2.25.1