diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2018-06-14 10:27:17 -0400 |
---|---|---|
committer | Gabriel Russell <gabriel.russell@mongodb.com> | 2018-06-14 15:28:33 -0400 |
commit | e730f7c6abee87b6f521b15d730e1044635eb7c6 (patch) | |
tree | f23de30686f5d0f8d18f514ea5890f3c62bf5669 /buildscripts/runandroidsim.sh | |
parent | 739b98f6717076ad60e0771b68959c0ff73df205 (diff) | |
download | mongo-e730f7c6abee87b6f521b15d730e1044635eb7c6.tar.gz |
SERVER-34006 build android embedded with api version 21
Diffstat (limited to 'buildscripts/runandroidsim.sh')
-rwxr-xr-x | buildscripts/runandroidsim.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/buildscripts/runandroidsim.sh b/buildscripts/runandroidsim.sh index 458cd93c2f8..1efb9e2aabd 100755 --- a/buildscripts/runandroidsim.sh +++ b/buildscripts/runandroidsim.sh @@ -1,8 +1,8 @@ #!/bin/sh -if [ "$#" -lt "4" ]; then +if [ "$#" -lt "5" ]; then echo "usage:" - echo "$0 <android-sdk-path> <sysarch> <directory> <test-path-in-directory>" + echo "$0 <android-sdk-path> <sysarch> <image-api-version> <directory> <test-path-in-directory>" exit 1 fi @@ -13,6 +13,8 @@ ANDROID_SDK=$1 shift ANDROID_SYSTEM_IMAGE_ARCH=$1 shift +ANDROID_IMAGE_API_VERSION=$1 +shift DIRECTORY=$1 shift TEST_PATH_IN_DIRECTORY=$1 @@ -40,12 +42,12 @@ cleanup() { } echo "Creating Android virtual device" -echo no | $ANDROID_SDK/tools/bin/avdmanager create avd --force -k "system-images;android-24;google_apis;$ANDROID_SYSTEM_IMAGE_ARCH" --name android_avd --abi google_apis/$ANDROID_SYSTEM_IMAGE_ARCH -p android_avd +echo no | $ANDROID_SDK/tools/bin/avdmanager create avd --force -k "system-images;android-$ANDROID_IMAGE_API_VERSION;google_apis;$ANDROID_SYSTEM_IMAGE_ARCH" --name android_avd --abi google_apis/$ANDROID_SYSTEM_IMAGE_ARCH -p android_avd trap 'cleanup $?' INT TERM EXIT echo "Starting the virtual device on the emulator" -$ANDROID_SDK/emulator/emulator @android_avd -no-window -no-audio & +$ANDROID_SDK/emulator/emulator @android_avd -no-window -no-audio -no-accel & EMULATOR_PID=$! echo "Waiting for the adb service to be ready for commands" |