summaryrefslogtreecommitdiff
path: root/test/scripts/light-system-test-stop.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-stop.sh
parent71cc72d3c5e977355ebb0aa8bcb065a08207ec2f (diff)
Improve start and stop of Erlang nodesbetter-start-stop
Diffstat (limited to 'test/scripts/light-system-test-stop.sh')
-rwxr-xr-xtest/scripts/light-system-test-stop.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/test/scripts/light-system-test-stop.sh b/test/scripts/light-system-test-stop.sh
index 2265a34..a946079 100755
--- a/test/scripts/light-system-test-stop.sh
+++ b/test/scripts/light-system-test-stop.sh
@@ -7,14 +7,20 @@ top_srcdir=$(cd $(dirname $0)/../..; pwd)
. ${top_srcdir}/test/scripts/testutils.sh
+nodetypes="$@"
+
stop_node() {
node=$1
${top_srcdir}/tools/to_catlfish.py to_erl nodes/${node}/ "init:stop()"
}
-for nodegroup in $FRONTENDNODES $MERGEPRIMARYNODE $STORAGENODES $MERGESECONDARYNODES $SIGNINGNODES; do
- for node in $nodegroup; do
- echo "starting $node"
- stop_node $(echo $node | tr ':' ' ')
- done
+nodes=
+for nodetype in $nodetypes; do
+ nodetype_uc=$(echo $nodetype | tr a-z A-Z)
+ nodes="$nodes $(eval echo \$${nodetype_uc}NODES)"
+done
+
+for node in $nodes; do
+ echo "stopping $node"
+ stop_node $(echo $node | tr ':' ' ')
done