aboutsummaryrefslogtreecommitdiffstats
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-03-12 12:19:09 +0800
commit854f6ec22bb109043087994419ab137c2b281312 (patch)
tree20a2079d41765ff0811b293e149b3c99c8bbd713
parentf3658a11e0a72da8da4c716cbcecc69d79f396ce (diff)
downloaddexon-854f6ec22bb109043087994419ab137c2b281312.tar
dexon-854f6ec22bb109043087994419ab137c2b281312.tar.gz
dexon-854f6ec22bb109043087994419ab137c2b281312.tar.bz2
dexon-854f6ec22bb109043087994419ab137c2b281312.tar.lz
dexon-854f6ec22bb109043087994419ab137c2b281312.tar.xz
dexon-854f6ec22bb109043087994419ab137c2b281312.tar.zst
dexon-854f6ec22bb109043087994419ab137c2b281312.zip
test: build bootnode if not exist
-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