aboutsummaryrefslogtreecommitdiffstats
path: root/meta-ivi-test/recipes-extended/common-api/common-api-test/common-api-test_t.inc
blob: 1c7cca9dd471153060cda66142e06bb249cd6b24 (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
#!/bin/sh
get_list() {
  return 1
}

get_title() {
  echo "Common API C++ runtime"
}

_run_dir=/opt/tests/common-api-test
_run_1() {
  ${_run_dir}/E05ManagerService &
  ${_run_dir}/E05ManagerClient &
  sleep 5
  kill -9 `pidof E05ManagerClient`
  kill -9 `pidof E05ManagerService`
  sleep 1
}

run_1() {
  if [ "x${1}" != "x" ]; then
    _run_1 >& /tmp/t
    _c1=`cat /tmp/t | grep "Special device 0 detected"`
    _c2=`cat /tmp/t | grep "Special device 0 removed"`
    _c3=`cat /tmp/t | grep "Device 1 detected"`
    _c4=`cat /tmp/t | grep "Device 1 removed"`
    if [ "x${_c1}" != "x" -a "x${_c2}" != "x" -a \
	"x${_c3}" != "x" -a "x${_c4}" != "x" ]; then
       echo " PASSED"
    else
       echo " FAILED"
    fi
  else
    _run_1
  fi
}