From f73fb5307ff0f7d9422962758882c3cda4e461fe Mon Sep 17 00:00:00 2001 From: Marc CARRE Date: Wed, 21 Dec 2016 11:12:25 +0000 Subject: [PATCH] Redirect sanity checks' output to temporary files (and archive them as artifact files under CircleCLI). This should make it easier to find and access relevant debugging information without polluting STDOUT and without any risk of log interleaving. See also: - https://weaveworks.slack.com/archives/net/p1482154505001192 - https://weaveworks.slack.com/archives/net/p1482254780001493 --- bin/circle-test-smoke | 2 ++ test/sanity_check.sh | 22 ++++++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/bin/circle-test-smoke b/bin/circle-test-smoke index 4164e20a..9e59d881 100755 --- a/bin/circle-test-smoke +++ b/bin/circle-test-smoke @@ -9,5 +9,7 @@ if [ -n "$TEST_AND_PUBLISH" ] ; then cd $SRCDIR/test eval $(./gce.sh hosts) export COVERAGE=true + export WEAVE_NET_SANITY_CHECKS_FILES="/tmp/weave_net_sanity_check_*.log" ./run_all.sh + cp $WEAVE_NET_SANITY_CHECKS_FILES $CIRCLE_ARTIFACTS fi diff --git a/test/sanity_check.sh b/test/sanity_check.sh index 737f9f6e..657bdf71 100755 --- a/test/sanity_check.sh +++ b/test/sanity_check.sh @@ -5,6 +5,7 @@ set -e begin=$(date +%s) +sanity_checks_files=${WEAVE_NET_SANITY_CHECKS_FILES:-"/tmp/weave_net_sanity_check_*.log"} whitely echo Ping each host from the other @@ -14,12 +15,17 @@ whitely echo Ping each host from the other function check_ping() { local output=$(run_on $1 $PING $2) local status=$? - echo $output + echo "$output" >> "${sanity_checks_files/\*/$1}" return $status } pids="" for host in $HOSTS; do + cat >> "${sanity_checks_files/\*/$host}" <> "${sanity_checks_files/\*/$1}" << EOF +# ===================================== +# Host Version Info: $1 +# ===================================== # docker version $docker_version + # docker info $docker_info -# weave version + +# docker inspect -f {{.Created}} weaveworks/weave: $docker_weave_version + +# weave version $weave_version EOF }