Merge pull request #2597 from lissyx/android-emulator
Use Xvfb for emulator
This commit is contained in:
commit
a0d01a5186
@ -1571,9 +1571,12 @@ android_setup_emulator()
|
|||||||
|
|
||||||
avdmanager create avd --name "ds-pixel" --device 17 --package "system-images;${api_level};google_apis;${flavor}"
|
avdmanager create avd --name "ds-pixel" --device 17 --package "system-images;${api_level};google_apis;${flavor}"
|
||||||
|
|
||||||
|
# Use xvfb because:
|
||||||
|
# > emulator: INFO: QtLogger.cpp:68: Warning: could not connect to display ((null):0, (null))
|
||||||
|
|
||||||
# -accel on is needed otherwise it is too slow, but it will require KVM support exposed
|
# -accel on is needed otherwise it is too slow, but it will require KVM support exposed
|
||||||
pushd ${ANDROID_SDK_HOME}
|
pushd ${ANDROID_SDK_HOME}
|
||||||
./tools/emulator -verbose -avd ds-pixel -no-skin -no-audio -no-window -no-boot-anim -accel off &
|
xvfb-run ./tools/emulator -verbose -avd ds-pixel -no-skin -no-audio -no-window -no-boot-anim -accel off &
|
||||||
emulator_rc=$?
|
emulator_rc=$?
|
||||||
export ANDROID_DEVICE_EMULATOR=$!
|
export ANDROID_DEVICE_EMULATOR=$!
|
||||||
popd
|
popd
|
||||||
|
@ -47,7 +47,7 @@ then:
|
|||||||
- $let:
|
- $let:
|
||||||
extraSystemSetup: { $eval: strip(str(build.system_setup)) }
|
extraSystemSetup: { $eval: strip(str(build.system_setup)) }
|
||||||
in: >
|
in: >
|
||||||
apt-get -qq update && apt-get -qq -y install git gnupg pixz sox sudo wget unzip software-properties-common &&
|
apt-get -qq update && apt-get -qq -y install git gnupg pixz sox sudo wget unzip software-properties-common xvfb &&
|
||||||
add-apt-repository --yes ppa:openjdk-r/ppa && apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --force-yes install openjdk-8-jdk && java -version && update-ca-certificates -f &&
|
add-apt-repository --yes ppa:openjdk-r/ppa && apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -qq -y --force-yes install openjdk-8-jdk && java -version && update-ca-certificates -f &&
|
||||||
${extraSystemSetup} &&
|
${extraSystemSetup} &&
|
||||||
adduser --system --home ${system.homedir.linux} ${system.username} &&
|
adduser --system --home ${system.homedir.linux} ${system.username} &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user