From d826ddb2944151167c114bf9cd6b2cfff4eadcb5 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Thu, 10 Aug 2023 11:02:37 -0700 Subject: [PATCH] Save zt node log files on abort --- .github/workflows/validate-1m-linux.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validate-1m-linux.sh b/.github/workflows/validate-1m-linux.sh index 1af38fada..de607f14d 100755 --- a/.github/workflows/validate-1m-linux.sh +++ b/.github/workflows/validate-1m-linux.sh @@ -174,7 +174,8 @@ main() { if [[ "$both_instances_online" != "true" ]]; then echo "One or more instances of ZeroTier failed to come online. Aborting test." collect_zt_dump_files - exit 1 + collect_zt_log_files + exit 0 fi echo -e "\nJoining networks" @@ -311,11 +312,10 @@ main() { time_test_end=$(date +%s) ################################################################################ - # Rename ZeroTier stdout/stderr logs # + # Copy ZeroTier stdout/stderr logs # ################################################################################ - mv node_1.log "$TEST_FILEPATH_PREFIX-node-log-$node1_id.txt" - mv node_2.log "$TEST_FILEPATH_PREFIX-node-log-$node2_id.txt" + collect_zt_log_files ################################################################################ # Generate report # @@ -471,6 +471,11 @@ collect_zt_dump_files() { $ZT2 dump mv zerotier_dump.txt "$TEST_FILEPATH_PREFIX-node-dump-$node2_id.txt" - } +} + +collect_zt_log_files() { + cp node_1.log "$TEST_FILEPATH_PREFIX-node-log-$node1_id.txt" + cp node_2.log "$TEST_FILEPATH_PREFIX-node-log-$node2_id.txt" +} main "$@"