Add -c to resume a previous run

This commit is contained in:
Michael Vines
2019-01-21 17:59:45 -08:00
committed by Grimes
parent 1cdab81a3c
commit 61e79e6d02

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
skipSetup=false
iterations=1 iterations=1
restartInterval=never restartInterval=never
rollingRestart=false rollingRestart=false
@ -30,6 +31,8 @@ Start a local cluster and run sanity on it
-r - Select the RPC endpoint hosted by a node that starts as -r - Select the RPC endpoint hosted by a node that starts as
a validator node. If unspecified the RPC endpoint hosted by a validator node. If unspecified the RPC endpoint hosted by
the bootstrap leader will be used. the bootstrap leader will be used.
-c - Reuse existing node/ledger configuration from a previous sanity
run
EOF EOF
exit $exitcode exit $exitcode
@ -37,11 +40,14 @@ EOF
cd "$(dirname "$0")"/.. cd "$(dirname "$0")"/..
while getopts "h?i:k:brxR" opt; do while getopts "ch?i:k:brxR" opt; do
case $opt in case $opt in
h | \?) h | \?)
usage usage
;; ;;
c)
skipSetup=true
;;
i) i)
iterations=$OPTARG iterations=$OPTARG
;; ;;
@ -215,7 +221,11 @@ flag_error() {
exit 1 exit 1
} }
if ! $skipSetup; then
multinode-demo/setup.sh multinode-demo/setup.sh
else
verifyLedger
fi
startNodes startNodes
while [[ $iteration -le $iterations ]]; do while [[ $iteration -le $iterations ]]; do
echo "--- Node count ($iteration)" echo "--- Node count ($iteration)"