X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fscripts%2Fapplication-lifecycle.sh;fp=common%2Fscripts%2Fapplication-lifecycle.sh;h=d28709ac394f72d4bf0b3caef8e3730518e50207;hb=78de0a3bfca15c9793bcb24381d843fdc43a9516;hp=448491790d64c008bb47f3ad8d7732134420cfbb;hpb=63b7812201fd3b20c7c0efdea23e24d09c11f8a1;p=src%2Fqa-testdefinitions.git diff --git a/common/scripts/application-lifecycle.sh b/common/scripts/application-lifecycle.sh index 4484917..d28709a 100755 --- a/common/scripts/application-lifecycle.sh +++ b/common/scripts/application-lifecycle.sh @@ -50,7 +50,8 @@ fi grep -o '[a-z-]*.wgt' index.html | sort | uniq | while read wgtfile do - WGTNAME=$(echo $wgtfile | sed 's,.wgt$,,') + # remove extension and the debug state + WGTNAME=$(echo $wgtfile | sed 's,.wgt$,,' | sed 's,-debug$,,') SERVICE_PLATFORM=0 SERVICE_USER=0 APPLICATION_USER=0 @@ -110,7 +111,7 @@ do fi echo "DEBUG: check presence of $WGTNAME" - NAMEID=$(grep id\\\":\\\"${WGTNAME} $LIST | cut -d\" -f4 | cut -d\\ -f1) + NAMEID=$(grep id\\\":\\\"${WGTNAME}\" $LIST | cut -d\" -f4 | cut -d\\ -f1) if [ ! -z "$NAMEID" ];then echo "DEBUG: $WGTNAME already installed as $NAMEID" # need to kill then deinstall @@ -155,9 +156,12 @@ do lava-test-case afm-util-install-$WGTNAME --result pass fi # message is like \"added\":\"mediaplayer@0.1\" - NAMEID=$(grep d\\\":\\\"${WGTNAME} $OUT | cut -d\" -f4 | cut -d\\ -f1) + NAMEID=$(grep d\\\":\\\"${WGTNAME}\" $OUT | cut -d\" -f4 | cut -d\\ -f1) if [ -z "$NAMEID" ];then echo "ERROR: Cannot get nameid" + echo "DEBUG: ========== DUMPING output ==========" + cat $OUT + echo "DEBUG: ========== END DUMP ==========" continue fi echo "DEBUG: $WGTNAME is installed as $NAMEID"