diff options
author | Magnus Ahltorp <map@kth.se> | 2017-02-07 16:29:46 +0100 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2017-02-07 21:22:52 +0100 |
commit | 142b19cda6f9c6133c3559f320bb96b10447fb3b (patch) | |
tree | b96a7d2f23502ff0486ee4ea541af348ccf51d72 /test/scripts/light-system-test-start.sh | |
parent | 70a87a1d878106aa97205507c3cd3eb9ba1667f2 (diff) |
Improve start and stop of Erlang nodes
Diffstat (limited to 'test/scripts/light-system-test-start.sh')
-rwxr-xr-x | test/scripts/light-system-test-start.sh | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/test/scripts/light-system-test-start.sh b/test/scripts/light-system-test-start.sh index cdfda8c..51d38ac 100755 --- a/test/scripts/light-system-test-start.sh +++ b/test/scripts/light-system-test-start.sh @@ -7,6 +7,8 @@ top_srcdir=$(cd $(dirname $0)/../..; pwd) . ${top_srcdir}/test/scripts/testutils.sh +nodetypes="$@" + start_node() { node=$1 node_app=$2 @@ -14,18 +16,24 @@ start_node() { "exec ../bin/erl -boot ${node_app} -config ${node}" } -for nodegroup in $SIGNINGNODES $MERGESECONDARYNODES $STORAGENODES $FRONTENDNODES; do - for node in $nodegroup; do - echo "starting $node" - start_node $(echo $node | tr ':' ' ') - done +nodes= +testurls= +for nodetype in $nodetypes; do + nodetype_uc=$(echo $nodetype | tr a-z A-Z) + nodes="$nodes $(eval echo \$${nodetype_uc}NODES)" + testurls="$testurls $(eval echo \$${nodetype_uc}TESTURLS)" +done + +for node in $nodes; do + echo "starting $node" + start_node $(echo $node | tr ':' ' ') done for i in 1 2 3 4 5 6 7 8 9 10; do echo "waiting for system to start" sleep 0.5 allstarted=1 notstarted= - for testurl in ${TESTURLS}; do + for testurl in ${testurls}; do if curl -s --cacert httpsca/demoCA/cacert.pem -4 https://${testurl} > /dev/null ; then : else @@ -40,10 +48,3 @@ for i in 1 2 3 4 5 6 7 8 9 10; do echo Not started: ${notstarted} fi done - -if [ $# -gt 0 ] && [ "$1" = "initlog" ]; then - shift 1 - $top_srcdir/tools/initlog.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg $@ -fi - -start_node $(echo ${MERGEPRIMARYNODE} | tr ':' ' ') |