Print the containernet cli logs when a pattern is missing
authorcgeoffroy <geoffroy.chollon@thalesgroup.com>
Tue, 11 Apr 2017 08:58:53 +0000 (10:58 +0200)
committercgeoffroy <geoffroy.chollon@thalesgroup.com>
Tue, 11 Apr 2017 08:58:53 +0000 (10:58 +0200)
utils/ci/check_manual_usage_example.sh

index 0c5c32b..e2b1597 100755 (executable)
@@ -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}
 }