From 82a9122fc3fd58a1fb07777fc103f6789d9e534f Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Thu, 10 Aug 2023 09:58:47 -0700 Subject: [PATCH] Update validate-1m-linux.sh --- .github/workflows/validate-1m-linux.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/validate-1m-linux.sh b/.github/workflows/validate-1m-linux.sh index c044245a0..1af38fada 100755 --- a/.github/workflows/validate-1m-linux.sh +++ b/.github/workflows/validate-1m-linux.sh @@ -173,6 +173,7 @@ 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 fi @@ -283,16 +284,7 @@ main() { # Collect ZeroTier dump files # ################################################################################ - echo -e "\nCollecting ZeroTier dump files" - - node1_id=$($ZT1 -j status | jq -r .address) - node2_id=$($ZT2 -j status | jq -r .address) - - $ZT1 dump - mv zerotier_dump.txt "$TEST_FILEPATH_PREFIX-node-dump-$node1_id.txt" - - $ZT2 dump - mv zerotier_dump.txt "$TEST_FILEPATH_PREFIX-node-dump-$node2_id.txt" + collect_zt_dump_files ################################################################################ # Let ZeroTier idle long enough for various timers # @@ -468,4 +460,17 @@ check_exit_on_invalid_identity() { fi } +collect_zt_dump_files() { + echo -e "\nCollecting ZeroTier dump files" + + node1_id=$($ZT1 -j status | jq -r .address) + node2_id=$($ZT2 -j status | jq -r .address) + + $ZT1 dump + mv zerotier_dump.txt "$TEST_FILEPATH_PREFIX-node-dump-$node1_id.txt" + + $ZT2 dump + mv zerotier_dump.txt "$TEST_FILEPATH_PREFIX-node-dump-$node2_id.txt" + } + main "$@"