4 # Kangho Kim <kh5325.kim@samsung.com>, Yoonki Park <yoonki.park@samsung.com>
6 # Description: front hand of app launcher
8 APP_PATH_PREFIX=/opt/apps
9 SDK_TOOLS_PATH=/home/developer/sdk_tools
13 echo "usage: $0 -p <pkgid> -e <executable> -m <run|debug|da|oprofile> [-P <port>] [-attach <pid>] -t <gtest,gcov> [<args...>]"
39 if [ "$2" != "run" ] && [ "$2" != "debug" ] && [ "$2" != "da" ] && [ "$2" != "oprofile" ]
66 if [ "$2" = "" ] || [ ${2:0:1} = "-" ]
73 if [ "$type" = "gtest" ]
75 COV_TEST_PREFIX="export LD_LIBRARY_PATH=%s/gtest/usr/lib && $COV_TEST_PREFIX"
76 if [ "" != "$result_mode" ]
78 result_mode="$result_mode,UNIT_TEST"
80 launch_app_mode="__LAUNCH_APP_MODE__ SYNC"
81 result_mode="UNIT_TEST"
84 if [ "$type" = "gcov" ]
86 COV_TEST_PREFIX="export GCOV_PREFIX=/tmp/%s/data && export GCOV_PREFIX_STRIP=0 && $COV_TEST_PREFIX"
87 if [ "" != "$result_mode" ]
89 result_mode="$result_mode,CODE_COVERAGE"
91 launch_app_mode="__LAUNCH_APP_MODE__ SYNC"
92 result_mode="CODE_COVERAGE"
102 if [ "$first" = "true" ]
105 args="__DLP_UNIT_TEST_ARG__ $1"
113 if [ "$mode" = "debug" ]
115 if [ "" != "$attach_id" ]
118 cmd="$COV_TEST_PREFIX /home/developer/sdk_tools/gdbserver/gdbserver :$port --attach $attach_id"
121 if [ "" != "$result_mode" ]
123 result_mode="DEBUG,$result_mode"
127 cmd="/usr/bin/launch_app $pkgid.$exe __AUL_SDK__ $result_mode __DLP_DEBUG_ARG__ :$port $launch_app_mode $args"
128 # cmd="$COV_TEST_PREFIX /home/developer/sdk_tools/gdbserver/gdbserver :$port /opt/apps/$pkgid/bin/$exe"
131 if [ "$mode" = "run" ]
133 if [ "" != "$result_mode" ]
135 cmd="/usr/bin/launch_app $pkgid.$exe __AUL_SDK__ $result_mode $launch_app_mode $args"
137 cmd="/usr/bin/launch_app $pkgid.$exe"
140 if [ "$mode" = "da" ]
142 if [ "" != "$result_mode" ]
144 result_mode="DYNAMIC_ANALYSIS,$result_mode"
146 result_mode="DYNAMIC_ANALYSIS"
149 if [ "$mode" = "oprofile" ]
151 if [ "" == "$result_mode" ]
153 result_mode="OPROFILE"
156 cmd="/usr/bin/launch_app $pkgid.$exe __AUL_SDK__ $result_mode"