From 158354755a563ccddaaec4a8f20522121e19572d Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Wed, 7 Aug 2019 10:16:15 -0700 Subject: [PATCH] test: output etcd server logs when functional tests fail Signed-off-by: Gyuho Lee --- test | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test b/test index 796512800..6347b1420 100755 --- a/test +++ b/test @@ -223,6 +223,18 @@ function functional_pass { kill -s TERM "${agent_pids[@]}" || true if [[ "${ETCD_TESTER_EXIT_CODE}" -ne "0" ]]; then + printf "\n" + echo "FAILED! 'tail -1000 /tmp/etcd-functional-1/etcd.log'" + tail -1000 /tmp/etcd-functional-1/etcd.log + + printf "\n" + echo "FAILED! 'tail -1000 /tmp/etcd-functional-2/etcd.log'" + tail -1000 /tmp/etcd-functional-2/etcd.log + + printf "\n" + echo "FAILED! 'tail -1000 /tmp/etcd-functional-3/etcd.log'" + tail -1000 /tmp/etcd-functional-3/etcd.log + echo "--- FAIL: exit code" ${ETCD_TESTER_EXIT_CODE} exit ${ETCD_TESTER_EXIT_CODE} fi