#Linux JDK
export JAVA_HOME=/usr/local/jdk/jdk1.7.0_67
 
#Linux
export ANT_HOME=/usr/local/apache-ant-1.9.4
export PATH=${PATH}:${ANT_HOME}/bin;
 
# Android SDK INSTALL PATH
export ANDROID_HOME=/home/kq/android/adt-bundle-linux-x86_64-20140702/sdk
export PATH=${PATH}:${JAVA_HOME}/bin;
export PATH=${PATH}:${ANT_HOME}/bin;
export PATH=${PATH}:${ANDROID_HOME}/tools;
export PATH=${PATH}:${ANDROID_HOME}/platform-tools;
 
#classpath emma add to classpath
export CLASSPATH=.:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar:${ANDROID_HOME}/tools/lib/emma.jar;
 
#android platform version
export PROJECT_NAME=AndroidDemoTest
export ANDROID_VER=android-19

PROJECT_PATH=/home/kq/workspace/Snake
TEST_PROJECT_PATH=/home/kq/workspace/tests
APP_COMPAT_V7_PATH=/home/kq/workspace/appcompat_v7
 
#to parent folder
#cd ..
 
# convert to v7 ant project
android update project -p ${APP_COMPAT_V7_PATH} -n "appcompat_v7" -t ${ANDROID_VER}


# convert to ant project
android update project -p ${PROJECT_PATH} -n ${PROJECT_NAME} -t ${ANDROID_VER}
 
# convert to ant test project
android update test-project -m ${PROJECT_PATH} -p ${TEST_PROJECT_PATH}
 
# run test
cd ${TEST_PROJECT_PATH}
ant clean emma debug install test
 
# open report
# open ./bin/coverage.html