From: Dmitry Bogatov Date: Fri, 19 Jul 2013 09:29:00 +0000 (+0400) Subject: [IMPROVE] Script to test preloading on *emulator* X-Git-Tag: Tizen_SDK_2.3~172 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4d5b4e47d48ad666bf1d1294accc781001883606;p=platform%2Fcore%2Fsystem%2Fswap-probe.git [IMPROVE] Script to test preloading on *emulator* --- diff --git a/test_preload.sh b/test_preload.sh new file mode 100644 index 0000000..7984d56 --- /dev/null +++ b/test_preload.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -e +PROGRAMS+="$(echo org.tizen.{clock,email,setting,taskmgr,download-manager})" +### Some of this is system services, that are not started via +### launch_app +#PROGRAMS+=$(cd /usr/apps && find|grep -E '\.exe$'|grep -v /_|sed -e "s#/bin/#.#g" -e "s#^\./##g" -e "s#\.exe##g") +echo $PROGRAMS +for prog in $PROGRAMS +do + printf $prog + launch_app $prog __AUL_SDK__ DYNAMIC_ANALYSIS + sleep 30 + last_part=$(echo $prog|sed -e 's#\.#/#g'|xargs basename) + pid=$(ps aux|grep /apps/|grep $last_part) + if [[ -z "$pid" ]] ; then + echo "Error: $prog failed to start" + else + pid=$(echo $pid|python -c "print(raw_input().split()[1])") + echo "Pid = $pid" + if ! grep da_probe_osp.so /proc/$pid/maps ; then + echo "Error: $prog is not preloaded." + fi + kill $pid + fi +done +