summaryrefslogtreecommitdiff
path: root/test/scripts/light-system-test-start.sh
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2017-02-07 16:29:46 +0100
committerMagnus Ahltorp <map@kth.se>2017-02-07 16:29:46 +0100
commit4108558e0ac7622776db69a283b83486647f8c65 (patch)
treebc7fc8c78ad048121eae859a91da26ae220106a0 /test/scripts/light-system-test-start.sh
parent71cc72d3c5e977355ebb0aa8bcb065a08207ec2f (diff)
Improve start and stop of Erlang nodesbetter-start-stop
Diffstat (limited to 'test/scripts/light-system-test-start.sh')
-rwxr-xr-xtest/scripts/light-system-test-start.sh24
1 files changed, 14 insertions, 10 deletions
diff --git a/test/scripts/light-system-test-start.sh b/test/scripts/light-system-test-start.sh
index 985a23c..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,7 +48,3 @@ for i in 1 2 3 4 5 6 7 8 9 10; do
echo Not started: ${notstarted}
fi
done
-
-[ $# -gt 0 ] && [ "$1" = "initlog" ] && $top_srcdir/tools/initlog.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg
-
-start_node $(echo ${MERGEPRIMARYNODE} | tr ':' ' ')