mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Taskcluster: test in Android emulator
This commit is contained in:
parent
556435ae01
commit
f357c6fe93
4 changed files with 42 additions and 1 deletions
|
@ -27,8 +27,10 @@ tasks:
|
||||||
|
|
||||||
# Granted to role "repo:github.com/servo/servo:branch:*"
|
# Granted to role "repo:github.com/servo/servo:branch:*"
|
||||||
- "queue:create-task:highest:aws-provisioner-v1/servo-*"
|
- "queue:create-task:highest:aws-provisioner-v1/servo-*"
|
||||||
|
- "queue:create-task:highest:proj-servo/*"
|
||||||
- "queue:route:index.project.servo.servo.*"
|
- "queue:route:index.project.servo.servo.*"
|
||||||
- "docker-worker:cache:servo-*"
|
- "docker-worker:cache:servo-*"
|
||||||
|
- "docker-worker:capability:privileged"
|
||||||
|
|
||||||
payload:
|
payload:
|
||||||
maxRunTime: {$eval: '20 * 60'}
|
maxRunTime: {$eval: '20 * 60'}
|
||||||
|
|
|
@ -94,7 +94,7 @@ def android_arm32():
|
||||||
|
|
||||||
|
|
||||||
def android_x86():
|
def android_x86():
|
||||||
return (
|
build_task = (
|
||||||
android_build_task("Android x86: release build")
|
android_build_task("Android x86: release build")
|
||||||
.with_script("./mach build --target i686-linux-android --release")
|
.with_script("./mach build --target i686-linux-android --release")
|
||||||
.with_artifacts(
|
.with_artifacts(
|
||||||
|
@ -103,6 +103,30 @@ def android_x86():
|
||||||
)
|
)
|
||||||
.find_or_create("build.android_x86_release." + CONFIG.git_sha)
|
.find_or_create("build.android_x86_release." + CONFIG.git_sha)
|
||||||
)
|
)
|
||||||
|
return (
|
||||||
|
DockerWorkerTask("Android x86: tests in emulator")
|
||||||
|
.with_provisioner_id("proj-servo")
|
||||||
|
.with_worker_type("docker-worker-kvm")
|
||||||
|
.with_capabilities(privileged=True)
|
||||||
|
.with_scopes("project:servo:docker-worker-kvm:capability:privileged")
|
||||||
|
.with_dockerfile(dockerfile_path("run-android-emulator"))
|
||||||
|
.with_dependencies(build_task)
|
||||||
|
.with_env(BUILD_TASK_ID=build_task)
|
||||||
|
.with_repo()
|
||||||
|
.with_script("""
|
||||||
|
mkdir -p target/i686-linux-android/release/
|
||||||
|
./etc/taskcluster/curl-artifact.sh ${BUILD_TASK_ID} servoapp.apk \
|
||||||
|
-o target/i686-linux-android/release/servoapp.apk
|
||||||
|
|
||||||
|
./mach bootstrap-android --accept-all-licences --emulator-x86
|
||||||
|
./mach test-android-startup --release
|
||||||
|
./mach test-wpt-android --release \
|
||||||
|
/_mozilla/mozilla/DOMParser.html \
|
||||||
|
/_mozilla/mozilla/webgl/context_creation_error.html
|
||||||
|
""")
|
||||||
|
.create()
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def windows_dev():
|
def windows_dev():
|
||||||
|
@ -199,6 +223,7 @@ def linux_run_task(name, build_task, script):
|
||||||
return (
|
return (
|
||||||
linux_task(name)
|
linux_task(name)
|
||||||
.with_dockerfile(dockerfile_path("run"))
|
.with_dockerfile(dockerfile_path("run"))
|
||||||
|
.with_repo()
|
||||||
.with_early_script("""
|
.with_early_script("""
|
||||||
./etc/taskcluster/curl-artifact.sh ${BUILD_TASK_ID} target.tar.gz | tar -xz
|
./etc/taskcluster/curl-artifact.sh ${BUILD_TASK_ID} target.tar.gz | tar -xz
|
||||||
""")
|
""")
|
||||||
|
|
|
@ -512,6 +512,7 @@ class DockerWorkerTask(Task):
|
||||||
self.env = {}
|
self.env = {}
|
||||||
self.caches = {}
|
self.caches = {}
|
||||||
self.features = {}
|
self.features = {}
|
||||||
|
self.capabilities = {}
|
||||||
self.artifacts = []
|
self.artifacts = []
|
||||||
|
|
||||||
with_docker_image = chaining(setattr, "docker_image")
|
with_docker_image = chaining(setattr, "docker_image")
|
||||||
|
@ -521,6 +522,7 @@ class DockerWorkerTask(Task):
|
||||||
with_early_script = chaining(prepend_to_attr, "scripts")
|
with_early_script = chaining(prepend_to_attr, "scripts")
|
||||||
with_caches = chaining(update_attr, "caches")
|
with_caches = chaining(update_attr, "caches")
|
||||||
with_env = chaining(update_attr, "env")
|
with_env = chaining(update_attr, "env")
|
||||||
|
with_capabilities = chaining(update_attr, "capabilities")
|
||||||
|
|
||||||
def build_worker_payload(self):
|
def build_worker_payload(self):
|
||||||
"""
|
"""
|
||||||
|
@ -541,6 +543,7 @@ class DockerWorkerTask(Task):
|
||||||
env=self.env,
|
env=self.env,
|
||||||
cache=self.caches,
|
cache=self.caches,
|
||||||
features=self.features,
|
features=self.features,
|
||||||
|
capabilities=self.capabilities,
|
||||||
artifacts={
|
artifacts={
|
||||||
"public/" + url_basename(path): {
|
"public/" + url_basename(path): {
|
||||||
"type": "file",
|
"type": "file",
|
||||||
|
|
11
etc/taskcluster/docker/run-android-emulator.dockerfile
Normal file
11
etc/taskcluster/docker/run-android-emulator.dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
% include base.dockerfile
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
apt-get install -qy --no-install-recommends \
|
||||||
|
#
|
||||||
|
# Multiple Android-related tools are in Java
|
||||||
|
openjdk-8-jdk-headless \
|
||||||
|
#
|
||||||
|
# Emulator dependencies
|
||||||
|
libgl1 \
|
||||||
|
libpulse0
|
Loading…
Add table
Add a link
Reference in a new issue