aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_test.sh
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-02-25 20:35:36 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:57 +0800
commit058e5c5173df8ddbcb0abd92683311fa68795924 (patch)
tree855e9292f7349058f8cebe1d5c18582f4010fbfd /test/run_test.sh
parent27d1254cd5459b69217b4b7877493a008e9dbe3e (diff)
downloaddexon-058e5c5173df8ddbcb0abd92683311fa68795924.tar
dexon-058e5c5173df8ddbcb0abd92683311fa68795924.tar.gz
dexon-058e5c5173df8ddbcb0abd92683311fa68795924.tar.bz2
dexon-058e5c5173df8ddbcb0abd92683311fa68795924.tar.lz
dexon-058e5c5173df8ddbcb0abd92683311fa68795924.tar.xz
dexon-058e5c5173df8ddbcb0abd92683311fa68795924.tar.zst
dexon-058e5c5173df8ddbcb0abd92683311fa68795924.zip
test: build bootnode if not exist
Diffstat (limited to 'test/run_test.sh')
-rwxr-xr-xtest/run_test.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/run_test.sh b/test/run_test.sh
index 60f7cad82..f995393f6 100755
--- a/test/run_test.sh
+++ b/test/run_test.sh
@@ -2,10 +2,17 @@
NETWORK="--bootnodes enode://0478aa13c91aa0db8e93b668313b7eb0532fbdb24f64772375373b14dbe326c238ad09ab4469f6442c9a9753f1275aeec2e531912c14a958ed1feb4ae7e227ef@127.0.0.1:30301"
GENESIS="genesis.json"
-# Start bootnode.
-../build/bin/bootnode -nodekey keystore/bootnode.key --verbosity=9 > bootnode.log 2>&1 &
-GDEX=../build/bin/gdex
+GDEX="../build/bin/gdex"
+BOOTNODE="../build/bin/bootnode"
+
+if [ ! -e "$BOOTNODE" ]; then
+ echo "Building bootnode for the first time ..."
+ go build -o $BOOTNODE ../cmd/bootnode
+fi
+
+# Start bootnode.
+$BOOTNODE -nodekey keystore/bootnode.key --verbosity=9 > bootnode.log 2>&1 &
# Kill all previous instances.
pkill -9 -f gdex