[TCT][Scripts][Non-ACR] Fixed launch failed issue 64/320764/1
authorutk.tiwari <utk.tiwari@samsung.com>
Fri, 7 Mar 2025 06:47:49 +0000 (12:17 +0530)
committerutk.tiwari <utk.tiwari@samsung.com>
Fri, 7 Mar 2025 06:47:49 +0000 (12:17 +0530)
Change-Id: I753f4ebd92e78e08e0a7134450d9c97403969abb
Signed-off-by: utk.tiwari <utk.tiwari@samsung.com>
scripts_tpk/external_wrapper.sh

index 06271c1e389db9dbc719f8c0c5be99b29e059394..e4dc4b19bc49d0b97d15793f2cf8b33981dd3da0 100755 (executable)
@@ -92,7 +92,10 @@ function Execute {
                if [ $COUNTER -eq $TIMEOUT_VALUE ];
                then
                        # terminate launched application
-                       su -c "app_launcher -s $1 > /dev/null" $DEVICE_EXECUTION_MODE_30
+                       alive=`su -c "app_launcher -r $1" $DEVICE_EXECUTION_MODE_30 | grep "not"`
+                       if [ "$alive" == "" ]; then
+                               su -c "app_launcher -t $1 > /dev/null" $DEVICE_EXECUTION_MODE_30
+                       fi
                        echo "Timeout! [ Execution exceeded $TIMEOUT_VALUE seconds ]"
                        if [ -e $ERRLOG_PATH ];
                        then