Prepare the nogfx variant of the service check
[src/qa-testdefinitions.git] / common / scripts / service-check-gfx.sh
similarity index 73%
rename from common/scripts/service-check.sh
rename to common/scripts/service-check-gfx.sh
index 4dc0a25..2a5353b 100755 (executable)
@@ -7,16 +7,19 @@ ALL="${REQUIREDSOCKETS} ${REQUIREDSERVICES}"
 RESULT="unknown"
 
 for i in ${ALL} ; do
-    echo "########## Test for service ${i} being active ##########"
+    echo -e "\n########## Test for service ${i} being active ##########\n"
     systemctl is-active ${i} >/dev/null 2>&1
     if [ $? -eq 0 ] ; then
         RESULT="pass"
     else
-        systemctl status ${i} || true
         RESULT="fail"
     fi
-    echo "########## Result for service ${i} : $RESULT ##########"
     lava-test-case ${i} --result ${RESULT}
+
+    if [ x"fail" == x"${RESULT}" ] ; then
+        systemctl status ${i} || true
+    fi
+    echo -e "\n########## Result for service ${i} : $RESULT ##########\n"
 done
 
 exit 0
\ No newline at end of file