diff options
author | Sonic <sonic@dexon.org> | 2019-04-05 10:45:05 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:59 +0800 |
commit | 5b80717ed4b1633e889b9a2cc241827a9dbd44d5 (patch) | |
tree | 065c7e3b014b85c1fb870c3368affac8bea7efb0 /test/run_test.sh | |
parent | d52097c148c5247be8e346c8eca3c3cfc8fdd770 (diff) | |
download | go-tangerine-5b80717ed4b1633e889b9a2cc241827a9dbd44d5.tar go-tangerine-5b80717ed4b1633e889b9a2cc241827a9dbd44d5.tar.gz go-tangerine-5b80717ed4b1633e889b9a2cc241827a9dbd44d5.tar.bz2 go-tangerine-5b80717ed4b1633e889b9a2cc241827a9dbd44d5.tar.lz go-tangerine-5b80717ed4b1633e889b9a2cc241827a9dbd44d5.tar.xz go-tangerine-5b80717ed4b1633e889b9a2cc241827a9dbd44d5.tar.zst go-tangerine-5b80717ed4b1633e889b9a2cc241827a9dbd44d5.zip |
build: add end to end integration test for recovery mechanism (#336)
Diffstat (limited to 'test/run_test.sh')
-rwxr-xr-x | test/run_test.sh | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/test/run_test.sh b/test/run_test.sh index b6db1ba09..1f19caa6a 100755 --- a/test/run_test.sh +++ b/test/run_test.sh @@ -6,6 +6,22 @@ GENESIS="genesis.json" GDEX="../build/bin/gdex" BOOTNODE="../build/bin/bootnode" + +CONTINUE=false +IGNORELOG=false +while [[ $# -gt 0 ]]; do + case "$1" in + --continue) + CONTINUE=true + ;; + --ignore-log) + IGNORELOG=true + ;; + esac + shift +done + + if [ ! -e "$BOOTNODE" ]; then echo "Building bootnode for the first time ..." go build -o $BOOTNODE ../cmd/bootnode @@ -42,7 +58,7 @@ __FILE__ # A standalone RPC server for accepting RPC requests. datadir=$PWD/Dexon.rpc -if [ "$1" != "--continue" ]; then +if ! $CONTINUE; then rm -rf $datadir $GDEX --datadir=$datadir init ${GENESIS} fi @@ -64,7 +80,7 @@ NUM_NODES=$(cat ${GENESIS} | grep 'DEXON Test Node' | wc -l) for i in $(seq 0 $(($NUM_NODES - 1))); do datadir=$PWD/Dexon.$i - if [ "$1" != "--continue" ]; then + if ! $CONTINUE; then rm -rf $datadir $GDEX --datadir=$datadir init ${GENESIS} fi @@ -85,6 +101,6 @@ for i in $(seq 0 $(($NUM_NODES - 1))); do > $logsdir/gdex.$i.log 2>&1 & done -if [ "$1" != "--ignore-log" ]; then +if ! $IGNORELOG; then tail -f $logsdir/gdex.*.log fi |