summaryrefslogtreecommitdiff
path: root/test/scripts/light-system-test-stop.sh
diff options
context:
space:
mode:
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