From ed213538c78b5d5ca492aae6033627952bbf186a Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Mon, 31 Jul 2023 15:03:32 +0200 Subject: [PATCH] more log lines when jobs fail (#5226) Increase log lines emitted on test failure to 1000. --- Makefile | 12 ++++++------ scripts/launch_local_testnet.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 1035fd76d..8f0267d18 100644 --- a/Makefile +++ b/Makefile @@ -390,8 +390,8 @@ endif NIMBUS_TEST_KEYMANAGER_BASE_PORT=$$(( $(UNIT_TEST_BASE_PORT) + EXECUTOR_NUMBER * 25 + 0 )) \ NIMBUS_TEST_SIGNING_NODE_BASE_PORT=$$(( $(UNIT_TEST_BASE_PORT) + EXECUTOR_NUMBER * 25 + 4 )) \ build/$${TEST_BINARY} $${PARAMS} || { \ - echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 50 lines from the log:"; \ - tail -n50 "$${TEST_BINARY}.log"; exit 1; \ + echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 1000 lines from the log:"; \ + tail -n1000 "$${TEST_BINARY}.log"; exit 1; \ }; \ done; \ rm -rf 0000-*.json t_slashprot_migration.* *.log block_sim_db @@ -405,13 +405,13 @@ endif echo -e "\nRunning $${TEST_BINARY} $${PARAMS}\n"; \ if [[ "$${REDIRECT}" != "" ]]; then \ build/$${TEST_BINARY} $${PARAMS} > "$${REDIRECT}" && echo "OK" || { \ - echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 50 lines from the log:"; \ - tail -n50 "$${TEST_BINARY}.log"; exit 1; \ + echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 1000 lines from the log:"; \ + tail -n1000 "$${TEST_BINARY}.log"; exit 1; \ }; \ else \ build/$${TEST_BINARY} $${PARAMS} || { \ - echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 50 lines from the log:"; \ - tail -n50 "$${TEST_BINARY}.log"; exit 1; \ + echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 1000 lines from the log:"; \ + tail -n1000 "$${TEST_BINARY}.log"; exit 1; \ }; \ fi; \ done; \ diff --git a/scripts/launch_local_testnet.sh b/scripts/launch_local_testnet.sh index 5d5656a70..5ef5703b0 100755 --- a/scripts/launch_local_testnet.sh +++ b/scripts/launch_local_testnet.sh @@ -930,7 +930,7 @@ if [[ "${LIGHTHOUSE_VC_NODES}" != "0" ]]; then fi dump_logs() { - LOG_LINES=20 + LOG_LINES=1000 for LOG in "${DATA_DIR}"/logs/*; do echo "Last ${LOG_LINES} lines of ${LOG}:" tail -n ${LOG_LINES} "${LOG}"