summaryrefslogtreecommitdiff
path: root/test/scripts/light-system-test-stop.sh
blob: a946079da96b5a3c426df9a69066d159ee85a962 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

set -o nounset
set -o errexit

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()"
}

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