7 while getopts ":b:d:" option; do
10 if [[ $OPTARG = -* ]]; then
22 REQUIREDSOCKETS="dbus.socket"
25 ALL="${REQUIREDSOCKETS} ${REQUIREDSERVICES}"
28 # add delay for services to fully start
32 echo -e "\n\n########## Test for service ${i} being active ##########\n\n"
34 if [[ ${i} == "weston.service" ]]; then
35 if [[ ${DEVICE_TAGS} != *"screen"* ]] || [[ ${BUILD_TAGS} != *"screen"* ]]; then
39 if [[ -z $RESULT ]]; then
40 systemctl is-active ${i} >/dev/null 2>&1
41 if [ $? -eq 0 ] ; then
45 if [[ ${i} == "bluetooth.service" ]]; then
46 if [[ ${DEVICE_TAGS} != *"bluetooth"* ]] || [[ ${BUILD_TAGS} != *"bluetooth"* ]]; then
50 if [[ ${i} == "ofono.service" ]]; then
51 if [[ ${DEVICE_TAGS} != *"bluetooth"* ]] || [[ ${BUILD_TAGS} != *"bluetooth"* ]]; then
58 lava-test-case ${i} --result ${RESULT}
59 systemctl status ${i} || true
62 echo -e "\n\n########## Result for service ${i} : $RESULT ##########\n\n"
65 echo "------------------------------------------------"
66 echo "All systemd units:"
67 echo "------------------------------------------------"
68 systemctl list-units || true
69 echo "------------------------------------------------"
70 echo "Only the failed systemd units:"
71 echo "------------------------------------------------"
72 ( systemctl list-units | grep failed ) || true