2012-08-23 17:21:11 +08:00
|
|
|
#!/bin/bash
|
|
|
|
#This script is used to finished a android automated compiler in Mac OS.
|
|
|
|
#You'd better add "export PATH=$PATH:$ANDROID_HOME/platform-tools" and "export
|
|
|
|
#PATH=$PATH:$ANDROID_HOME/tools" to you bash_profile,it will be very convenient.
|
|
|
|
|
|
|
|
#Copy monkeyrunner python script to tools directory.
|
|
|
|
cd ../..
|
|
|
|
CUR=$(pwd)
|
|
|
|
cp $CUR/Monkeyrunner_TestsCpp.py $ANDROID_HOME/tools
|
|
|
|
|
|
|
|
cd ../..
|
|
|
|
cd samples/TestCpp/proj.android/bin
|
|
|
|
|
|
|
|
#Copy test apk to tools directory.
|
|
|
|
CUR=$(pwd)
|
2012-08-27 15:12:55 +08:00
|
|
|
cp $CUR/TestCpp-debug-8.apk $ANDROID_HOME/tools
|
|
|
|
cp $CUR/TestCpp-debug-10.apk $ANDROID_HOME/tools
|
|
|
|
cp $CUR/TestCpp-debug-11.apk $ANDROID_HOME/tools
|
|
|
|
cp $CUR/TestCpp-debug-12.apk $ANDROID_HOME/tools
|
|
|
|
cp $CUR/TestCpp-debug-13.apk $ANDROID_HOME/tools
|
2012-08-23 17:21:11 +08:00
|
|
|
|
|
|
|
#Enter tools directory.
|
|
|
|
cd $ANDROID_HOME
|
|
|
|
|
|
|
|
#If monkeyrunner test failed,it automatically exit and make ERRORLEVEL nonzero.
|
|
|
|
|
|
|
|
#Running monkeyrunner test(debug,API level:8)
|
2012-08-27 15:12:55 +08:00
|
|
|
mv TestCpp-debug-8.apk TestCpp-debug.apk
|
2012-08-23 17:21:11 +08:00
|
|
|
monkeyrunner Monkeyrunner_TestsCpp.py
|
2012-08-27 15:12:55 +08:00
|
|
|
rm TestCpp-debug.apk
|
2012-08-23 17:21:11 +08:00
|
|
|
|
|
|
|
#Running monkeyrunner test(debug,API level:10)
|
2012-08-27 15:12:55 +08:00
|
|
|
mv TestCpp-debug-10.apk TestCpp-debug.apk
|
2012-08-23 17:21:11 +08:00
|
|
|
monkeyrunner Monkeyrunner_TestsCpp.py
|
2012-08-27 15:12:55 +08:00
|
|
|
rm TestCpp-debug.apk
|
2012-08-23 17:21:11 +08:00
|
|
|
|
|
|
|
#Running monkeyrunner test(debug,API level:11)
|
2012-08-27 15:12:55 +08:00
|
|
|
mv TestCpp-debug-11.apk TestCpp-debug.apk
|
2012-08-23 17:21:11 +08:00
|
|
|
monkeyrunner Monkeyrunner_TestsCpp.py
|
2012-08-27 15:12:55 +08:00
|
|
|
rm TestCpp-debug.apk
|
2012-08-23 17:21:11 +08:00
|
|
|
|
|
|
|
#Running monkeyrunner test(debug,API level:12)
|
2012-08-27 15:12:55 +08:00
|
|
|
mv TestCpp-debug-12.apk TestCpp-debug.apk
|
2012-08-23 17:21:11 +08:00
|
|
|
monkeyrunner Monkeyrunner_TestsCpp.py
|
2012-08-27 15:12:55 +08:00
|
|
|
rm TestCpp-debug.apk
|
2012-08-23 17:21:11 +08:00
|
|
|
|
|
|
|
#Running monkeyrunner test(debug,API level:13)
|
2012-08-27 15:12:55 +08:00
|
|
|
mv TestCpp-debug-13.apk TestCpp-debug.apk
|
2012-08-23 17:21:11 +08:00
|
|
|
monkeyrunner Monkeyrunner_TestsCpp.py
|
2012-08-27 15:12:55 +08:00
|
|
|
rm TestCpp-debug.apk
|
2012-08-23 17:21:11 +08:00
|
|
|
|
|
|
|
rm Monkeyrunner_TestsCpp.py
|
|
|
|
|
|
|
|
#Monkeyrunner success!
|
|
|
|
git checkout -f
|
|
|
|
git clean -df -x
|