aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSonic <sonic@dexon.org>2019-04-05 10:45:05 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-15 22:09:55 +0800
commit9041a4c140f07e41ca35ee5fe09af5d54c1fa044 (patch)
tree2b4e9c9871f28c2ba656cab6df016d217cff4197 /test
parent8bb384eb28d4aceba63b8077f664381fb3c06444 (diff)
downloadgo-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.tar
go-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.tar.gz
go-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.tar.bz2
go-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.tar.lz
go-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.tar.xz
go-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.tar.zst
go-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.zip
build: add end to end integration test for recovery mechanism (#336)
Diffstat (limited to 'test')
-rwxr-xr-xtest/run_test.sh22
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