diff options
author | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2019-10-19 00:30:33 +0200 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2019-10-19 00:31:08 +0200 |
commit | ba2a97f4acb44194cc2a827e344d71f916d432b8 (patch) | |
tree | 0a9cb6ad103f1c25cf01a9162bb1dbe98133c14e /common/scripts/application-lifecycle.sh | |
parent | 083006b12a5fb4938e1ce74875824238b0e90661 (diff) |
Improve lifecycle test
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Change-Id: I9076278096e15829b4bca52f6b5ef9e9a3b39e9e
Diffstat (limited to 'common/scripts/application-lifecycle.sh')
-rwxr-xr-x | common/scripts/application-lifecycle.sh | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/common/scripts/application-lifecycle.sh b/common/scripts/application-lifecycle.sh index 15d505c..83ca340 100755 --- a/common/scripts/application-lifecycle.sh +++ b/common/scripts/application-lifecycle.sh @@ -49,7 +49,7 @@ do echo "DEBUG: analyse wgt file" unzip $wgtfile - if [ $? -eq 0 ];then + if [ -f config.xml ];then grep hidden config.xml if [ $? -eq 0 ];then echo "DEBUG: hidden package" @@ -172,22 +172,24 @@ do # here we need to differ between SERVICE_PLATFORM, SERVICE_USER and APPLICATION_USER if test x"1" = x"$SERVICE_PLATFORM" ; then - PRE_CMD="su -c" + PRE_CMD="su -c ' " + POST_CMD=" '" fi if test x"1" = x"$SERVICE_USER" ; then - PRE_CMD="su $AGLDRIVER -c" + PRE_CMD="su $AGLDRIVER -c '" + POST_CMD=" '" fi if test x"1" = x"$APPLICATION_USER" ; then - PRE_CMD="su $AGLDRIVER -c" + PRE_CMD="su $AGLDRIVER -c '" + POST_CMD=" '" fi # construct the command to call CMD=( "$PRE_CMD" ) - CMD+=( " ' " ) CMD+=( "afm-util start $NAMEID" ) - CMD+=( " ' " ) + CMD+=( "$POST_CMD" ) echo "DEBUG: start $NAMEID" - exec "${CMD[@]}" > "rid" + ${CMD[@]} > "rid" if [ $? -ne 0 ];then echo "ERROR: afm-util start" lava-test-case afm-util-start-$WGTNAME --result fail |