aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-02-25 20:35:36 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:22 +0800
commit9babc19339f86e10cc6b2ad2a7550cbdc91b7c0b (patch)
tree4b8e2ec3d738db110d5965fbc9a1135742d6409c
parent20718c049c3988f6aac25bee2d33f959ad517deb (diff)
downloadgo-tangerine-9babc19339f86e10cc6b2ad2a7550cbdc91b7c0b.tar
go-tangerine-9babc19339f86e10cc6b2ad2a7550cbdc91b7c0b.tar.gz
go-tangerine-9babc19339f86e10cc6b2ad2a7550cbdc91b7c0b.tar.bz2
go-tangerine-9babc19339f86e10cc6b2ad2a7550cbdc91b7c0b.tar.lz
go-tangerine-9babc19339f86e10cc6b2ad2a7550cbdc91b7c0b.tar.xz
go-tangerine-9babc19339f86e10cc6b2ad2a7550cbdc91b7c0b.tar.zst
go-tangerine-9babc19339f86e10cc6b2ad2a7550cbdc91b7c0b.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