[M120 Migration] Remove hardcoded path of /opt/usr/apps inside bash 21/307521/3
authorManjeet <manjeet.1@partner.samsung.com>
Mon, 11 Mar 2024 16:40:17 +0000 (22:10 +0530)
committerDae-Hyun Ko <dhyuna.ko@samsung.com>
Thu, 14 Mar 2024 05:10:28 +0000 (05:10 +0000)
script tests_run

Currently tizen_src/ewk/tests_run script hardcodes path '/opt/usr/apps'.
Instead use tzplatform-get tool to get value of TZ_SYS_RW_APP which
returns the required path.

Reference:
https://review/tizen.org/gerrit/293968

Change-Id: Ice8fd487063bab7e7de55ea77b998b1f10bcb238
Signed-off-by: Manjeet <manjeet.1@partner.samsung.com>
tizen_src/ewk/tests_run

index ed164dd..e98b6ad 100755 (executable)
@@ -104,12 +104,14 @@ done
 
 function it {
   sdb push ${rep_dir}${2}-0.1-0.armv7l.rpm /opt/usr/media/Downloads/ && sdb shell pkgcmd -i -t rpm -q -p /opt/usr/media/Downloads/${2}-0.1-0.armv7l.rpm || exit 7
+  tz_sys_rw_app_value=`tzplatform-get -u 5001 TZ_SYS_RW_APP`
+  tz_sys_rw_app_path=${tz_sys_rw_app_value#*=}
   while read test ; do
-    echo /opt/usr/apps/${2}/bin/tct-${3}-core ${test}
+    echo ${tz_sys_rw_app_path}/${2}/bin/tct-${3}-core ${test}
     timeout 65 sdb shell > ${dir}${log}/${test}.log <<EOF
 rm -f $5
 df -k /opt/usr
-/opt/usr/apps/${2}/bin/tct-${3}-core ${test} ;
+${tz_sys_rw_app_path}/${2}/bin/tct-${3}-core ${test} ;
 echo "exit: \$? \`cat ${5}\`"
 exit
 EOF