aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/run_test.sh')
-rwxr-xr-xtest/run_test.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/run_test.sh b/test/run_test.sh
index 4818f89b2..b8b893145 100755
--- a/test/run_test.sh
+++ b/test/run_test.sh
@@ -1,13 +1,17 @@
#!/bin/bash
+if [ "$1" != "--testnet" ] && [ "$1" != "--taipei" ]; then
+ echo 'invalid network specified'
+ exit 1
+fi
+
+NETWORK="${1}"
+
GDEX=../build/bin/gdex
# Kill all previous instances.
pkill -9 -f gdex
-# Start bootnode.
-bootnode -nodekey bootnode.key --verbosity=9 > bootnode.log 2>&1 &
-
logsdir=$PWD/log-$(date '+%Y-%m-%d-%H:%M:%S')
mkdir $logsdir
@@ -19,7 +23,7 @@ datadir=$PWD/Dexon.rpc
rm -rf $datadir
$GDEX --datadir=$datadir init genesis.json
$GDEX \
- --testnet \
+ ${NETWORK} \
--verbosity=4 \
--gcmode=archive \
--datadir=$datadir --nodekey=testrpc.nodekey \
@@ -36,7 +40,7 @@ for i in $(seq 0 3); do
rm -rf $datadir
$GDEX --datadir=$datadir init genesis.json
$GDEX \
- --testnet \
+ ${NETWORK} \
--bp \
--verbosity=4 \
--gcmode=archive \