Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit a0d01a5

Browse files
authored
Merge pull request #2597 from lissyx/android-emulator
Use Xvfb for emulator
2 parents 2675cfc + 399a4f7 commit a0d01a5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

taskcluster/tc-tests-utils.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,9 +1571,12 @@ android_setup_emulator()
15711571

15721572
avdmanager create avd --name "ds-pixel" --device 17 --package "system-images;${api_level};google_apis;${flavor}"
15731573

1574+
# Use xvfb because:
1575+
# > emulator: INFO: QtLogger.cpp:68: Warning: could not connect to display ((null):0, (null))
1576+
15741577
# -accel on is needed otherwise it is too slow, but it will require KVM support exposed
15751578
pushd ${ANDROID_SDK_HOME}
1576-
./tools/emulator -verbose -avd ds-pixel -no-skin -no-audio -no-window -no-boot-anim -accel off &
1579+
xvfb-run ./tools/emulator -verbose -avd ds-pixel -no-skin -no-audio -no-window -no-boot-anim -accel off &
15771580
emulator_rc=$?
15781581
export ANDROID_DEVICE_EMULATOR=$!
15791582
popd

taskcluster/test-android-opt-base.tyml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ then:
4747
- $let:
4848
extraSystemSetup: { $eval: strip(str(build.system_setup)) }
4949
in: >
50-
apt-get -qq update && apt-get -qq -y install git gnupg pixz sox sudo wget unzip software-properties-common &&
50+
apt-get -qq update && apt-get -qq -y install git gnupg pixz sox sudo wget unzip software-properties-common xvfb &&
5151
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 &&
5252
${extraSystemSetup} &&
5353
adduser --system --home ${system.homedir.linux} ${system.username} &&

0 commit comments

Comments
 (0)