summaryrefslogtreecommitdiffstats
path: root/meta-ivi-test/recipes-extended/node-health-monitor/node-health-monitor/node-health-monitor_t.inc
blob: 2afbc922dca874a180fa1b82f3e44161e9dc31c0 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
get_list() {
  return 2
}

get_title() {
  echo "Node Health Monitor"
}

_run_dir=/opt/tests/node-health-monitor
_run_() {
  systemctl start nsm-dummy
  node-health-monitor &

  cd ${_run_dir}
  ./${1}

  kill -9 `pidof node-health-monitor`
  systemctl stop nsm-dummy
}

_run() {
  echo "[ FAILED ] node-head-monitor is not working properly"
  return 0

  if [ "x${2}" != "x" ]; then
    _run_ $1 > /tmp/t 2> /tmp/t.err
    _c1=$?
    if [ "x${_c1}" = "x0" ]; then
       echo "[ PASSED ]"
    else
       echo "[ FAILED ]"
    fi
  else
    _run_ $1 2> /tmp/t.err
  fi
}

run_1() {
    _run nhm-main-test $*
}

run_2() {
    _run nhm-systemd-test $*
}