Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #13 from hunter-packages/pr.partition.size
Browse files Browse the repository at this point in the history
Add GAUZE_ANDROID_EMULATOR_PARTITION_SIZE
  • Loading branch information
ruslo authored Apr 27, 2018
2 parents 16c8dd3 + a05fc76 commit 8eb23e5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions cmake/gauze_run_start_script.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ function(gauze_run_start_script)
set(GAUZE_ANDROID_EMULATOR_GPU "host")
endif()

if("${GAUZE_ANDROID_EMULATOR_PARTITION_SIZE}" STREQUAL "")
# https://developer.android.com/studio/run/emulator-commandline
set(GAUZE_ANDROID_EMULATOR_PARTITION_SIZE 200)
endif()

# Use:
# * GAUZE_ANDROID_ADB
# * GAUZE_ANDROID_EMULATOR
Expand All @@ -32,6 +37,7 @@ function(gauze_run_start_script)
# * GAUZE_START_LOG
# * ANDROID-SDK_ROOT
# * GAUZE_ANDROID_EMULATOR_GPU
# * GAUZE_ANDROID_EMULATOR_PARTITION_SIZE
configure_file(${GAUZE_START_EMULATOR_SCRIPT} "${start_script}" @ONLY)

set(bash_path "/bin/bash")
Expand Down
1 change: 1 addition & 0 deletions cmake/templates/start-emulator.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ export "ANDROID_SDK_ROOT=@ANDROID-SDK_ROOT@/android-sdk"
-no-window \
-port "@GAUZE_DEVICE_PORT@" \
-gpu "@GAUZE_ANDROID_EMULATOR_GPU@" \
-partition-size "@GAUZE_ANDROID_EMULATOR_PARTITION_SIZE@" \
1> "@GAUZE_START_LOG@" \
2> "@GAUZE_START_ERR@" &
11 changes: 8 additions & 3 deletions docs/prereq/android.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Emulator can be stopped by ``kill -9`` command:
<username> 9160 ... /.../android-sdk/tools/emulator64-arm -avd gauze_android-19_armeabi-v7a -no-window -port 5678 -gpu host
> kill -9 9160
Emulator GPU
============
Other options
=============

You can set ``GAUZE_ANDROID_EMULATOR_GPU`` to control what GPU type will be
using while creating Android emulator:
Expand All @@ -72,4 +72,9 @@ using while creating Android emulator:
For Travis CI:

* use ``host`` on macOS machines
* use ``none`` on Linux machines
* use ``off`` on Linux machines

You can set ``GAUZE_ANDROID_EMULATOR_PARTITION_SIZE`` to specify the system
data partition size in MBs.

* https://developer.android.com/studio/run/emulator-acceleration#command-gpu

0 comments on commit 8eb23e5

Please sign in to comment.