From 879ceab89fe7107202c731a0d502aba6255549d6 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Tue, 6 Feb 2024 14:40:11 -0800 Subject: [PATCH] test: large stage start log message --- .../upgrade-test-scripts/run_execute.sh | 13 ++++++++++- .../upgrade-test-scripts/run_prepare.sh | 22 ++++++++++++++----- .../upgrade-test-scripts/run_test.sh | 19 +++++++++++++--- .../upgrade-test-scripts/run_use.sh | 11 ++++++++++ 4 files changed, 56 insertions(+), 9 deletions(-) diff --git a/packages/synthetic-chain/upgrade-test-scripts/run_execute.sh b/packages/synthetic-chain/upgrade-test-scripts/run_execute.sh index a6acbf06..102d2dbb 100644 --- a/packages/synthetic-chain/upgrade-test-scripts/run_execute.sh +++ b/packages/synthetic-chain/upgrade-test-scripts/run_execute.sh @@ -1,5 +1,16 @@ #!/bin/bash -echo "Execute an upgrade" + +# figlet -f cyberlarge Execute upgrade +echo -e ' + _______ _ _ _______ _______ _ _ _______ _______ + |______ \___/ |______ | | | | |______ + |______ _/ \_ |______ |_____ |_____| | |______ + + _ _ _____ ______ ______ _______ ______ _______ + | | |_____] | ____ |_____/ |_____| | \ |______ + |_____| | |_____| | \_ | | |_____/ |______ +' +echo "Execute the upgrade in consensus" source ./env_setup.sh diff --git a/packages/synthetic-chain/upgrade-test-scripts/run_prepare.sh b/packages/synthetic-chain/upgrade-test-scripts/run_prepare.sh index f69674ef..31b5d436 100755 --- a/packages/synthetic-chain/upgrade-test-scripts/run_prepare.sh +++ b/packages/synthetic-chain/upgrade-test-scripts/run_prepare.sh @@ -1,6 +1,23 @@ #!/bin/bash # Prepare an upgrade +if [[ -z "${UPGRADE_TO}" ]]; then + echo "Requires UPGRADE_TO to be set" + exit 1 +fi + +# figlet -f cyberlarge Prepare upgrade +echo -e ' + _____ ______ _______ _____ _______ ______ _______ + |_____] |_____/ |______ |_____] |_____| |_____/ |______ + | | \_ |______ | | | | \_ |______ + + _ _ _____ ______ ______ _______ ______ _______ + | | |_____] | ____ |_____/ |_____| | \ |______ + |_____| | |_____| | \_ | | |_____/ |______ +' +echo "Preparing an upgrade to $UPGRADE_TO" + grep -qF 'env_setup.sh' /root/.bashrc || echo "source /usr/src/upgrade-test-scripts/env_setup.sh" >>/root/.bashrc grep -qF 'printKeys' /root/.bashrc || echo "printKeys" >>/root/.bashrc @@ -8,11 +25,6 @@ source ./env_setup.sh startAgd -if [[ -z "${UPGRADE_TO}" ]]; then - echo "Requires UPGRADE_TO to be set" - exit 1 -fi - voting_period_s=10 latest_height=$(agd status | jq -r .SyncInfo.latest_block_height) height=$((latest_height + voting_period_s + 20)) diff --git a/packages/synthetic-chain/upgrade-test-scripts/run_test.sh b/packages/synthetic-chain/upgrade-test-scripts/run_test.sh index 2edf31cb..4a1b5bef 100755 --- a/packages/synthetic-chain/upgrade-test-scripts/run_test.sh +++ b/packages/synthetic-chain/upgrade-test-scripts/run_test.sh @@ -3,17 +3,30 @@ # Note that STDOUT mixes the two. TODO separate them cleanly with log output. set -e - -source ./env_setup.sh - PROPOSAL=$1 if [ -z "$PROPOSAL" ]; then echo "Must specify what proposal to use" exit 1 fi +# figlet -f cyberlarge Test proposal outcome +echo ' + _______ _______ _______ _______ + | |______ |______ | + | |______ ______| | + + _____ ______ _____ _____ _____ _______ _______ + |_____] |_____/ | | |_____] | | |______ |_____| | + | | \_ |_____| | |_____| ______| | | |_____ + + _____ _ _ _______ _______ _____ _______ _______ + | | | | | | | | | | | |______ + |_____| |_____| | |_____ |_____| | | | |______ +' + echo "[$PROPOSAL] Starting agd" +source ./env_setup.sh startAgd echo "[$PROPOSAL] Running test.sh." diff --git a/packages/synthetic-chain/upgrade-test-scripts/run_use.sh b/packages/synthetic-chain/upgrade-test-scripts/run_use.sh index 237050d9..f7604262 100755 --- a/packages/synthetic-chain/upgrade-test-scripts/run_use.sh +++ b/packages/synthetic-chain/upgrade-test-scripts/run_use.sh @@ -21,6 +21,17 @@ if [ ! -f "$PROPOSAL_DIR/use.sh" ]; then exit 0 fi +# figlet -f cyberlarge Use proposal +echo ' + _ _ _______ _______ + | | |______ |______ + |_____| ______| |______ + + _____ ______ _____ _____ _____ _______ _______ + |_____] |_____/ | | |_____] | | |______ |_____| | + | | \_ |_____| | |_____| ______| | | |_____ +' + source ./env_setup.sh echo "[$PROPOSAL] Starting agd in the background."