From 3d167021a67e99203721654ad8f17271ba7ff9e6 Mon Sep 17 00:00:00 2001 From: Sergey Solovyev Date: Thu, 29 Nov 2012 20:47:08 +0400 Subject: [PATCH] monkey script --- calculatorpp/misc/other/take_screenshots2.sh | 24 ++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/calculatorpp/misc/other/take_screenshots2.sh b/calculatorpp/misc/other/take_screenshots2.sh index 2e3bdb65..ef4a2d56 100755 --- a/calculatorpp/misc/other/take_screenshots2.sh +++ b/calculatorpp/misc/other/take_screenshots2.sh @@ -1,13 +1,19 @@ #!/bin/bash -# "AVD_4.1_x86_6" "AVD_4.0.3_x86" "AVD_4.1_x86" "Default" "AVD_4.0.3_x86_7" "AVD_4.1_x86_7" "AVD_4.1_x86_9.5" "Galaxy_Tab" "AVD_4.1_x86_4" -# "AVD_4.1_x86_6" "AVD_4.1_x86_7" "AVD_4.1_x86_9.5" "AVD_4.1_x86_4" +predefined=1 +scale=0.51 -declare -a names=("AVD_4.1_x86_4") +# first predefined -for name in ${names[@]} -do - $ANDROID_HOME/tools/emulator -avd $name & - $ANDROID_HOME/tools/monkeyrunner ./take_screenshots.py ~/projects/java/android/calculatorpp/calculatorpp/misc/aux/tmp $name - $ANDROID_HOME/platform-tools/adb -s emulator-5580 emu kill -done \ No newline at end of file +if [ $predefined -eq 1 ] +then + declare -a names=("AVD_Nexus_7_by_Google") + for name in ${names[@]} + do + $ANDROID_HOME/tools/emulator -ports 5580,5581 -avd $name -scale $scale & + sleep 50 + $ANDROID_HOME/tools/monkeyrunner ./take_screenshots.py ~/projects/java/android/calculatorpp/calculatorpp/misc/other/tmp/2012.11.25 $name + $ANDROID_HOME/platform-tools/adb -s emulator-5580 emu kill + sleep 3 + done +fi \ No newline at end of file