From 61e79e6d0255c65a7d3e6bddad9081b77840638a Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Mon, 21 Jan 2019 17:59:45 -0800 Subject: [PATCH] Add -c to resume a previous run --- ci/localnet-sanity.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ci/localnet-sanity.sh b/ci/localnet-sanity.sh index 51c5923845..606686c4b1 100755 --- a/ci/localnet-sanity.sh +++ b/ci/localnet-sanity.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash set -e +skipSetup=false iterations=1 restartInterval=never 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 a validator node. If unspecified the RPC endpoint hosted by the bootstrap leader will be used. + -c - Reuse existing node/ledger configuration from a previous sanity + run EOF exit $exitcode @@ -37,11 +40,14 @@ EOF cd "$(dirname "$0")"/.. -while getopts "h?i:k:brxR" opt; do +while getopts "ch?i:k:brxR" opt; do case $opt in h | \?) usage ;; + c) + skipSetup=true + ;; i) iterations=$OPTARG ;; @@ -215,7 +221,11 @@ flag_error() { exit 1 } -multinode-demo/setup.sh +if ! $skipSetup; then + multinode-demo/setup.sh +else + verifyLedger +fi startNodes while [[ $iteration -le $iterations ]]; do echo "--- Node count ($iteration)"