Skip to content

Commit

Permalink
refactor: DONE_MARKER
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Oct 26, 2023
1 parent 84a7e80 commit 8dda00f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions upgrade-test-scripts/start_to_to.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/bin/bash

grep -qF 'env_setup.sh' /root/.bashrc || echo ". ./upgrade-test-scripts/env_setup.sh" >> /root/.bashrc
grep -qF 'printKeys' /root/.bashrc || echo "printKeys" >> /root/.bashrc
grep -qF 'env_setup.sh' /root/.bashrc || echo ". ./upgrade-test-scripts/env_setup.sh" >>/root/.bashrc
grep -qF 'printKeys' /root/.bashrc || echo "printKeys" >>/root/.bashrc

. ./upgrade-test-scripts/env_setup.sh

export SLOGFILE=slog.slog

startAgd

if ! test -f "$HOME/.agoric/runActions-${THIS_NAME}"; then
DONE_MARKER="$HOME/.agoric/runActions-${THIS_NAME}"

if ! test -f "$DONE_MARKER"; then
if [[ "${USE_JS}" == "1" ]]; then
pushd upgrade-test-scripts
yarn upgrade-tests || exit 1
Expand All @@ -20,8 +22,8 @@ if ! test -f "$HOME/.agoric/runActions-${THIS_NAME}"; then
runActions "actions"
runActions "test"
fi
touch "$HOME/.agoric/runActions-${THIS_NAME}"

touch "$DONE_MARKER"
fi

if [[ "$DEST" != "1" ]]; then
Expand All @@ -34,9 +36,10 @@ if [[ "$DEST" != "1" ]]; then

voting_period_s=10
latest_height=$(agd status | jq -r .SyncInfo.latest_block_height)
height=$(( $latest_height + $voting_period_s + 10 ))
height=$((latest_height + voting_period_s + 10))
info=${UPGRADE_INFO-"{}"}
if echo "$info" | jq .; then :
if echo "$info" | jq .; then
echo "upgrade-info: $info"
else
status=$?
echo "Upgrade info is not valid JSON: $info"
Expand Down

0 comments on commit 8dda00f

Please sign in to comment.