From 545c605f027f68dc6e73699c8cf538320562a163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Fri, 31 Mar 2017 17:09:11 +0200 Subject: [PATCH] Test: dump the content of the node logs. --- test/test-basic.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/test-basic.sh b/test/test-basic.sh index 31a8c82e1..d29a749eb 100755 --- a/test/test-basic.sh +++ b/test/test-basic.sh @@ -9,8 +9,12 @@ DATA_DIR="$(mktemp -td tezos_node.XXXXXXXXXX)" CLIENT_DIR="$(mktemp -td tezos_client.XXXXXXXXXX)" cleanup() { + [ -z "${NODE_PID}" ] || kill -9 ${NODE_PID} || true + echo + echo "Node's log:" + echo + cat $DATA_DIR/LOG rm -fr ${DATA_DIR} ${CLIENT_DIR} - [ -z "${NODE_PID}" ] || kill -9 ${NODE_PID} } trap cleanup EXIT QUIT INT @@ -18,10 +22,10 @@ NODE=../tezos-node CLIENT="../tezos-client -base-dir ${CLIENT_DIR}" CUSTOM_PARAM="--sandbox ./sandbox.json" -${NODE} run --data-dir "${DATA_DIR}" ${CUSTOM_PARAM} --rpc-addr "[::]:8732" > LOG 2>&1 & +${NODE} run --data-dir "${DATA_DIR}" ${CUSTOM_PARAM} --rpc-addr "[::]:8732" > "$DATA_DIR"/LOG 2>&1 & NODE_PID="$!" -echo "Created node, pid: ${NODE_PID}, log: ./test/LOG" +echo "Created node, pid: ${NODE_PID}, log: $DATA_DIR/LOG" sleep 3