diff options
author | Corentin LABBE <clabbe@baylibre.com> | 2019-10-22 14:11:15 +0200 |
---|---|---|
committer | Corentin LABBE <clabbe@baylibre.com> | 2019-10-22 14:20:04 +0200 |
commit | 9f36891d6fdee48056c9733fb5910087c9750b58 (patch) | |
tree | a9f368c13188ac2f6bc84ab7c88aa850bd46b83c | |
parent | 3f8568f7144055a870e00f99ae9c9c440eb3f2a6 (diff) |
SPEC-2903: fix the grep test method
While inspecting if application test is working with our latest
SPEC-2903 changes I see in job 8845 the following errors:
+ grep urn:AGL:widget:provided-api config.xml
+ '<feature' 'name=\"urn:AGL:widget:provided-api\">'
./common/scripts/application-lifecycle.sh: line 74: <feature: command not found
So let's change the grep method.
Furthermore, add a debug for the do_afm_util for being sure it work as
needed.
Bug-AGL: SPEC-2903
Change-Id: I5a8a6d98cd9dc6c1b2d1626fc6841eb2c2b16d53
Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
-rwxr-xr-x | common/scripts/application-lifecycle.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/common/scripts/application-lifecycle.sh b/common/scripts/application-lifecycle.sh index 64afdb6..551e5b6 100755 --- a/common/scripts/application-lifecycle.sh +++ b/common/scripts/application-lifecycle.sh @@ -30,8 +30,10 @@ fi do_afm_util() { if [ $SERVICE_USER -eq 1 -o $APPLICATION_USER -eq 1 ];then + echo "DEBUG: do_afm_util as $AGLDRIVER" su - $AGLDRIVER -c "afm-util $*" else + echo "DEBUG: do_afm_util as $(whoami)" afm-util $* fi return $? @@ -71,9 +73,11 @@ do echo "DEBUG: not hidden package" fi # a service sets urn:AGL:widget:provided-api - if $(grep "urn:AGL:widget:provided-api" config.xml) ; then + grep "urn:AGL:widget:provided-api" config.xml + if [ $? -eq 0 ] ; then # we are a service, now determine the scope ... - if $(grep "urn:AGL:permission::partner:scope-platform" config.xml) ; then + grep "urn:AGL:permission::partner:scope-platform" config.xml + if [ $? -eq 0 ];then SERVICE_PLATFORM=1 else SERVICE_USER=1 |