Prepare the nogfx variant of the service check
[src/qa-testdefinitions.git] / common / scripts / service-check-gfx.sh
1 #!/bin/bash
2
3 REQUIREDSOCKETS="cynara.socket dbus.socket security-manager.socket"
4 REQUIREDSERVICES="afm-system-daemon.service afm-user-daemon.service connman.service ofono.service weston.service HomeScreen.service lightmediascanner.service bluetooth.service"
5
6 ALL="${REQUIREDSOCKETS} ${REQUIREDSERVICES}"
7 RESULT="unknown"
8
9 for i in ${ALL} ; do
10     echo -e "\n########## Test for service ${i} being active ##########\n"
11     systemctl is-active ${i} >/dev/null 2>&1
12     if [ $? -eq 0 ] ; then
13         RESULT="pass"
14     else
15         RESULT="fail"
16     fi
17     lava-test-case ${i} --result ${RESULT}
18
19     if [ x"fail" == x"${RESULT}" ] ; then
20         systemctl status ${i} || true
21     fi
22     echo -e "\n########## Result for service ${i} : $RESULT ##########\n"
23 done
24
25 exit 0