aboutsummaryrefslogtreecommitdiffstats
path: root/eth/test/tests/common.sh
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-06 00:10:42 +0800
committerobscuren <geffobscura@gmail.com>2015-01-06 00:10:42 +0800
commit6abf8ef78f1474fdeb7a6a6ce084bf994cc055f2 (patch)
treeb898711590694cfaa6f10dbc2a4c8591232954ef /eth/test/tests/common.sh
parentb0854fbff5c3d588134f577918a39d08002235dc (diff)
downloaddexon-6abf8ef78f1474fdeb7a6a6ce084bf994cc055f2.tar.gz
dexon-6abf8ef78f1474fdeb7a6a6ce084bf994cc055f2.tar.zst
dexon-6abf8ef78f1474fdeb7a6a6ce084bf994cc055f2.zip
Merge
Diffstat (limited to 'eth/test/tests/common.sh')
-rw-r--r--eth/test/tests/common.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/eth/test/tests/common.sh b/eth/test/tests/common.sh
new file mode 100644
index 000000000..74db073f7
--- /dev/null
+++ b/eth/test/tests/common.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# launched by run.sh
+function test_node {
+ rm -rf $DIR/$1
+ ARGS="-datadir $DIR/$1 -debug debug -seed=false -shh=false -id test$1"
+ if [ "" != "$2" ]; then
+ chain="chains/$2.chain"
+ echo "import chain $chain"
+ $ETH $ARGS -loglevel 3 -chain $chain | grep CLI |grep import
+ fi
+ echo "starting test node $1 with extra args ${@:3}"
+ $ETH $ARGS -port 303$1 ${@:3} &
+ PID=$!
+ PIDS="$PIDS $PID"
+}
+
+function peer {
+ test_node $@ -loglevel 5 -logfile debug.log -maxpeer 1 -dial=false
+} \ No newline at end of file