aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishal Bhoj <vishal.bhoj@linaro.org>2013-02-26 14:39:32 +0530
committerVishal Bhoj <vishal.bhoj@linaro.org>2013-02-26 14:39:32 +0530
commit1c327c9f258be067de14adeab096172239192ca2 (patch)
treec8a6adea948b96bd8920c9abbb17a3cdb821f44c
parenta26d0c340628136ec474d568ab0adeb03e2a9f3b (diff)
benchmark-scripts: Handle multiple devices connectedHEADmaster
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rwxr-xr-xbenchmarks-script/andebench/run.sh1
-rwxr-xr-xbenchmarks-script/antutu/run.sh3
-rwxr-xr-xbenchmarks-script/caffeinemark/run.sh1
-rwxr-xr-xbenchmarks-script/common/common.sh34
-rwxr-xr-xbenchmarks-script/geekbench/run.sh1
-rwxr-xr-xbenchmarks-script/glbenchmark/run.sh13
-rwxr-xr-xbenchmarks-script/linpack/run.sh1
-rwxr-xr-xbenchmarks-script/nbench/run.sh1
-rwxr-xr-xbenchmarks-script/quadrant/run.sh1
-rwxr-xr-xbenchmarks-script/vellamo/run.sh1
10 files changed, 33 insertions, 24 deletions
diff --git a/benchmarks-script/andebench/run.sh b/benchmarks-script/andebench/run.sh
index 5522c69..198cc41 100755
--- a/benchmarks-script/andebench/run.sh
+++ b/benchmarks-script/andebench/run.sh
@@ -8,5 +8,6 @@ apk_package="com.eembc.coremark"
#following should no need to modify
parent_dir=`dirname ${0}`
+export DEV_ID=$1
source "${parent_dir}/../common/common.sh"
main "$@"
diff --git a/benchmarks-script/antutu/run.sh b/benchmarks-script/antutu/run.sh
index 66dc194..d148095 100755
--- a/benchmarks-script/antutu/run.sh
+++ b/benchmarks-script/antutu/run.sh
@@ -5,9 +5,10 @@ activity="com.antutu.ABenchMark/.ABenchMarkStart"
apk_file_name="com.antutu.ABenchMark-1.apk"
test_method="testAntutu"
apk_package="com.antutu.ABenchMark"
+export DEV_ID=$1
function change_no_update(){
- user=`adb shell ls -l /data/data/|grep com.antutu.ABenchMark|cut -d \ -f 2`
+ user=`adb -s $DEV_ID shell ls -l /data/data/|grep com.antutu.ABenchMark|cut -d \ -f 2`
user=`echo ${user}|sed 's/\r//'`
dir_prefs="/data/data/com.antutu.ABenchMark/shared_prefs"
adb push ${parent_dir}/shared_prefs "${dir_prefs}"
diff --git a/benchmarks-script/caffeinemark/run.sh b/benchmarks-script/caffeinemark/run.sh
index 668917b..a11756e 100755
--- a/benchmarks-script/caffeinemark/run.sh
+++ b/benchmarks-script/caffeinemark/run.sh
@@ -5,6 +5,7 @@ activity="com.flexycore.caffeinemark/.Application"
apk_file_name="com.flexycore.caffeinemark-1.apk"
test_method="testCaffeine"
apk_package="com.flexycore.caffeinemark"
+export DEV_ID=$1
#following should no need to modify
parent_dir=`dirname ${0}`
diff --git a/benchmarks-script/common/common.sh b/benchmarks-script/common/common.sh
index 47fbe7c..cf3b41d 100755
--- a/benchmarks-script/common/common.sh
+++ b/benchmarks-script/common/common.sh
@@ -9,25 +9,25 @@ do_streamline=false
function switch_to_A15(){
- adb shell echo 0 > /sys/devices/system/cpu/cpu0/cpuidle/state1/disable
- adb shell echo 0 > /sys/kernel/debug/idle_debug/enable_idle
- adb shell echo 1 > /sys/kernel/debug/idle_debug/enable_idle
- adb shell echo 0 > /sys/kernel/bL_switcher/active
+ adb -s $DEV_ID shell echo 0 > /sys/devices/system/cpu/cpu0/cpuidle/state1/disable
+ adb -s $DEV_ID shell echo 0 > /sys/kernel/debug/idle_debug/enable_idle
+ adb -s $DEV_ID shell echo 1 > /sys/kernel/debug/idle_debug/enable_idle
+ adb -s $DEV_ID shell echo 0 > /sys/kernel/bL_switcher/active
# wait 10 seconds here
- adb shell echo 1 > /sys/devices/system/cpu/cpu0/online
- adb shell echo 1 > /sys/devices/system/cpu/cpu1/online
- adb shell echo 0 > /sys/devices/system/cpu/cpu2/online
- adb shell echo 0 > /sys/devices/system/cpu/cpu3/online
- adb shell echo 0 > /sys/devices/system/cpu/cpu4/online
- adb shell echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
- adb shell echo interactive > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
- adb shell echo 90 > /sys/devices/system/cpu/cpufreq/interactive/target_load
- adb shell echo 80000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
- adb shell echo 1000000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
- adb shell echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
- adb shell echo 80000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
- adb shell echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ adb -s $DEV_ID shell echo 1 > /sys/devices/system/cpu/cpu0/online
+ adb -s $DEV_ID shell echo 1 > /sys/devices/system/cpu/cpu1/online
+ adb -s $DEV_ID shell echo 0 > /sys/devices/system/cpu/cpu2/online
+ adb -s $DEV_ID shell echo 0 > /sys/devices/system/cpu/cpu3/online
+ adb -s $DEV_ID shell echo 0 > /sys/devices/system/cpu/cpu4/online
+ adb -s $DEV_ID shell echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ adb -s $DEV_ID shell echo interactive > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ adb -s $DEV_ID shell echo 90 > /sys/devices/system/cpu/cpufreq/interactive/target_load
+ adb -s $DEV_ID shell echo 80000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ adb -s $DEV_ID shell echo 1000000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ adb -s $DEV_ID shell echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ adb -s $DEV_ID shell echo 80000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ adb -s $DEV_ID shell echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
}
function install_linaro_android_jar(){
diff --git a/benchmarks-script/geekbench/run.sh b/benchmarks-script/geekbench/run.sh
index e06c610..2a907b4 100755
--- a/benchmarks-script/geekbench/run.sh
+++ b/benchmarks-script/geekbench/run.sh
@@ -5,6 +5,7 @@ activity="ca.primatelabs.geekbench2/.HomeActivity"
apk_file_name="ca.primatelabs.geekbench2-1.apk"
test_method="testGeekbench"
apk_package="ca.primatelabs.geekbench2"
+export DEV_ID=$1
#following should no need to modify
parent_dir=`dirname ${0}`
diff --git a/benchmarks-script/glbenchmark/run.sh b/benchmarks-script/glbenchmark/run.sh
index 2c6f838..0ff7cd0 100755
--- a/benchmarks-script/glbenchmark/run.sh
+++ b/benchmarks-script/glbenchmark/run.sh
@@ -6,6 +6,7 @@ activity="com.glbenchmark.glbenchmark25/com.glbenchmark.activities.GLBenchmarkDo
apk_file_name="GLBenchmark_2.5.1.apk"
test_method="testGLBenchmark"
apk_package="com.glbenchmark.glbenchmark25"
+export DEV_ID=$1
function func_post_install(){
#get the obb file and push it into android
@@ -21,16 +22,16 @@ function func_post_install(){
user=`adb shell ls -l /data/data/|grep com.glbenchmark.glbenchmark25|cut -d \ -f 2`
user=`echo ${user}|sed 's/\r//'`
dir_prefs="/data/data/com.glbenchmark.glbenchmark25/shared_prefs"
- adb push ${parent_dir}/shared_prefs "${dir_prefs}"
- adb shell chown ${user}:${user} "${dir_prefs}"
- adb shell chmod 771 "${dir_prefs}"
- adb shell chown ${user}:${user} "${dir_prefs}/com.glbenchmark.glbenchmark25_preferences.xml"
- adb shell chmod 660 "${dir_prefs}/com.glbenchmark.glbenchmark25_preferences.xml"
+ adb -s $DEV_ID push ${parent_dir}/shared_prefs "${dir_prefs}"
+ adb -s $DEV_ID shell chown ${user}:${user} "${dir_prefs}"
+ adb -s $DEV_ID shell chmod 771 "${dir_prefs}"
+ adb -s $DEV_ID shell chown ${user}:${user} "${dir_prefs}/com.glbenchmark.glbenchmark25_preferences.xml"
+ adb -s $DEV_ID shell chmod 660 "${dir_prefs}/com.glbenchmark.glbenchmark25_preferences.xml"
}
#following should no need to modify
parent_dir=`dirname ${0}`
source "${parent_dir}/../common/common.sh"
post_install="func_post_install"
-pre_uninstall="adb pull /data/data/com.glbenchmark.glbenchmark25/cache/last_results_2.5.1.xml $parent_dir/last_results_2.5.1.xml"
+pre_uninstall="adb -s $DEV_ID pull /data/data/com.glbenchmark.glbenchmark25/cache/last_results_2.5.1.xml $parent_dir/last_results_2.5.1.xml"
main "$@"
diff --git a/benchmarks-script/linpack/run.sh b/benchmarks-script/linpack/run.sh
index 0d71c73..7385117 100755
--- a/benchmarks-script/linpack/run.sh
+++ b/benchmarks-script/linpack/run.sh
@@ -5,6 +5,7 @@ activity="com.greenecomputing.linpack/.Linpack"
apk_file_name="com.greenecomputing.linpack-1.apk"
test_method="testLinpack"
apk_package="com.greenecomputing.linpack"
+export DEV_ID=$1
#following should no need to modify
parent_dir=`dirname ${0}`
diff --git a/benchmarks-script/nbench/run.sh b/benchmarks-script/nbench/run.sh
index a96c77f..20b51fa 100755
--- a/benchmarks-script/nbench/run.sh
+++ b/benchmarks-script/nbench/run.sh
@@ -5,6 +5,7 @@ activity="com.drolez.nbench/.MainActivity"
apk_file_name="com.drolez.nbench-1.apk"
test_method="testNBench"
apk_package="com.drolez.nbench"
+export DEV_ID=$1
#following should no need to modify
parent_dir=`dirname ${0}`
diff --git a/benchmarks-script/quadrant/run.sh b/benchmarks-script/quadrant/run.sh
index d436618..4b4aab0 100755
--- a/benchmarks-script/quadrant/run.sh
+++ b/benchmarks-script/quadrant/run.sh
@@ -5,6 +5,7 @@ activity="com.aurorasoftworks.quadrant.ui.standard/.QuadrantStandardLauncherActi
apk_file_name="com.aurorasoftworks.quadrant.ui.standard-1.apk"
test_method="testQuadrant"
apk_package="com.aurorasoftworks.quadrant.ui.standard"
+export DEV_ID=$1
#following should no need to modify
parent_dir=`dirname ${0}`
diff --git a/benchmarks-script/vellamo/run.sh b/benchmarks-script/vellamo/run.sh
index f7cf105..73435e0 100755
--- a/benchmarks-script/vellamo/run.sh
+++ b/benchmarks-script/vellamo/run.sh
@@ -5,6 +5,7 @@ activity="com.quicinc.vellamo/.Vellamo"
apk_file_name="com.quicinc.vellamo-1.apk"
test_method="testVellamo"
apk_package="com.quicinc.vellamo"
+export DEV_ID=$1
#following should no need to modify
parent_dir=`dirname ${0}`