From 8f95badb120bc83ab737b966109e309c8b977980 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Sun, 3 Jun 2018 12:04:00 -0700 Subject: [PATCH] cat iptb logs on iptb failure (for debugging CI) License: MIT Signed-off-by: Steven Allen --- test/sharness/lib/iptb-lib.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/sharness/lib/iptb-lib.sh b/test/sharness/lib/iptb-lib.sh index 2bb546150..59276866e 100644 --- a/test/sharness/lib/iptb-lib.sh +++ b/test/sharness/lib/iptb-lib.sh @@ -17,6 +17,17 @@ check_has_connection() { grep "ipfs" "swarm_peers_$node" >/dev/null } +iptb() { + if ! command iptb "$@"; then + case "$1" in + start|stop|connect) + test_fsh command iptb logs '*' + ;; + esac + return 1 + fi +} + startup_cluster() { num_nodes="$1" shift