diff options
author | Senthil Kumaran <senthil.kumaran@linaro.org> | 2013-04-22 14:50:04 +0530 |
---|---|---|
committer | Senthil Kumaran <senthil.kumaran@linaro.org> | 2013-04-22 14:50:04 +0530 |
commit | 95b866ce1dc57e99346cd8545fb5069c924beac8 (patch) | |
tree | 8bfa16f41c8953df8428405f1b251535ef09eca6 /android | |
parent | 36d487ba57ec28ec8c68e278bef148a7f4949c17 (diff) |
Add final version of 0xbench test definition to android. Fix bug #1170635
Diffstat (limited to 'android')
-rwxr-xr-x | android/scripts/0xbench/0xbench.sh | 100 | ||||
-rw-r--r-- | android/scripts/0xbench/ZeroxBench_Preference.xml | 5 |
2 files changed, 105 insertions, 0 deletions
diff --git a/android/scripts/0xbench/0xbench.sh b/android/scripts/0xbench/0xbench.sh new file mode 100755 index 0000000..f36d2c9 --- /dev/null +++ b/android/scripts/0xbench/0xbench.sh @@ -0,0 +1,100 @@ +#!/system/bin/sh +# +# 0xbench test. +# +# Copyright (C) 2012, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# owner: harigopal.gollamudi@linaro.org + + +#######################################android_0xbenchmark_kill.py + +pid=`ps |grep org.zeroxlab.zeroxbenchmark|tr -s " "|cut -d' ' -f2` +#echo $pid +kill $pid +rm -rf /data/data/org.zeroxlab.zeroxbenchmark/files* +rm -rf /data/data/org.zeroxlab.zeroxbenchmark/shared_prefs* + +########################################android_0xbenchmark_modify_path.py + +source=$PWD/android/scripts/0xbench/ZeroxBench_Preference.xml +target="/data/data/org.zeroxlab.zeroxbenchmark/shared_prefs/ZeroxBench_Preference.xml" + +target_dir="/data/data" + +group="None" +owner="None" + +group=`ls -l /data/data/|grep org.zeroxlab.zeroxbenchmark|tr -s " "|cut -d \ -f 2` +owner=`ls -l /data/data/|grep org.zeroxlab.zeroxbenchmark|tr -s " "|cut -d \ -f 3` + + +#echo group:$group +#echo owner:$owner + +target_dir="/data/data/org.zeroxlab.zeroxbenchmark/shared_prefs" + + +#make dir +mkdir $target_dir +#echo "directory created" +#change owner +chown $owner:$group $target_dir +#echo "owner changed" +#change mode +chmod 771 $target_dir +#echo "mode changed" +#push file +cp $source $target +#change owner +chown $owner:$group $target +#change mode +chmod 660 $target + +target_dir="/data/data/org.zeroxlab.zeroxbenchmark/files" + +#make dir +mkdir $target_dir +#change owner +chown $owner:$group $target_dir +#change mode +chmod 771 $target_dir + +########################################0xbench.py + + +save_dir="/data/data/org.zeroxlab.zeroxbenchmark/files" + +#options to come from app which runs activity manager + +logcat -c + +am start -n org.zeroxlab.zeroxbenchmark/org.zeroxlab.zeroxbenchmark.Benchmark --ez autorun true --ez math true --ez 2d true + + +######################################## + +while [ ! -f /data/data/org.zeroxlab.zeroxbenchmark/files/0xBenchmark.bundle ] +do + sleep 2 +done +#cp /data/data/org.zeroxlab.zeroxbenchmark/files/0xBenchmark.bundle /mnt/sdcard/0xBenchmark.bundle + +logcat -d | grep "0xbench_test_case:" |tr -s " "|cut -d \ -f 4,5,6,7,8 > 0xBenchmarkresult.txt +cat 0xBenchmarkresult.txt + +#cat /mnt/sdcard/0xBenchmark.bundle + diff --git a/android/scripts/0xbench/ZeroxBench_Preference.xml b/android/scripts/0xbench/ZeroxBench_Preference.xml new file mode 100644 index 0000000..6f07a12 --- /dev/null +++ b/android/scripts/0xbench/ZeroxBench_Preference.xml @@ -0,0 +1,5 @@ +<?xml version='1.0' encoding='utf-8' standalone='yes' ?> +<map> +<string name="KEY_RESULT_CUSTOM_DIR">/data/data/org.zeroxlab.zeroxbenchmark/files</string> +<int name="KEY_RESULT_SELECTION" value="1" /> +</map> |