From 4548e39ad9be605cb180b5e94bb1d87ab8243d5d Mon Sep 17 00:00:00 2001 From: Loys Ollivier Date: Fri, 22 Sep 2017 16:23:41 +0200 Subject: [SPEC-272] Add service test New test definition. Check that needed services are up. Signed-off-by: Loys Ollivier --- common/scripts/service-check.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 common/scripts/service-check.sh (limited to 'common/scripts') 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 -- cgit 1.2.3-korg