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 21:22:52 +0100
commit142b19cda6f9c6133c3559f320bb96b10447fb3b (patch)
treeb96a7d2f23502ff0486ee4ea541af348ccf51d72 /test/scripts/light-system-test-stop.sh
parent70a87a1d878106aa97205507c3cd3eb9ba1667f2 (diff)
Improve start and stop of Erlang nodes
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 aef9c76..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 "stopping $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