Skip to content

Commit

Permalink
test: large stage start log message
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Feb 6, 2024
1 parent 4cf6ff4 commit 879ceab
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 9 deletions.
13 changes: 12 additions & 1 deletion packages/synthetic-chain/upgrade-test-scripts/run_execute.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down
22 changes: 17 additions & 5 deletions packages/synthetic-chain/upgrade-test-scripts/run_prepare.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
#!/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

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))
Expand Down
19 changes: 16 additions & 3 deletions packages/synthetic-chain/upgrade-test-scripts/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
11 changes: 11 additions & 0 deletions packages/synthetic-chain/upgrade-test-scripts/run_use.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 879ceab

Please sign in to comment.