Merge pull request #2597 from lissyx/android-emulator

Use Xvfb for emulator
This commit is contained in:
lissyx 2019-12-13 15:39:04 +01:00 committed by GitHub
commit a0d01a5186
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -1571,9 +1571,12 @@ android_setup_emulator()
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
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=$?
export ANDROID_DEVICE_EMULATOR=$!
popd

View File

@ -47,7 +47,7 @@ then:
- $let:
extraSystemSetup: { $eval: strip(str(build.system_setup)) }
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 &&
${extraSystemSetup} &&
adduser --system --home ${system.homedir.linux} ${system.username} &&