summaryrefslogtreecommitdiffstats
path: root/common/scripts
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-09-26 11:30:43 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2017-09-26 11:30:43 +0000
commite29b660f31b1eac2690bd09b77e1fd6b8f4e2192 (patch)
tree8d7c06791058057538bc3fe33b40f2096ae4117d /common/scripts
parent2fda23339e56d986da130781bc1d63fdd21ef211 (diff)
parent4548e39ad9be605cb180b5e94bb1d87ab8243d5d (diff)
Merge "[SPEC-272] Add service test"
Diffstat (limited to 'common/scripts')
-rwxr-xr-xcommon/scripts/service-check.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/common/scripts/service-check.sh b/common/scripts/service-check.sh
new file mode 100755
index 0000000..6ffa6f6
--- /dev/null
+++ b/common/scripts/service-check.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+REQUIREDSOCKETS="cynara.socket dbus.socket security-manager.socket"
+REQUIREDSERVICES="afm-system-daemon.service afm-user-daemon.service connman.service ofono.service weston.service HomeScreen.service lightmediascanner.service bluetooth.service"
+
+ALL="${REQUIREDSOCKETS} ${REQUIREDSERVICES}"
+RESULT="unknown"
+
+for i in ${ALL} ; do
+ systemctl is-active ${i} >/dev/null 2>&1
+ if [ $? -eq 0 ] ; then
+ RESULT="pass"
+ else
+ RESULT="fail"
+ fi
+ lava-test-case ${i} --result ${RESULT}
+done
+
+exit 0 \ No newline at end of file