New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mach bootstrap-android and test-android-startup commands #21094

Merged
merged 30 commits into from Jul 2, 2018

Conversation

Projects
None yet
7 participants
@SimonSapin
Copy link
Member

SimonSapin commented Jun 25, 2018

This adds a ./mach boostrap-android subcommand that downloads and installs the tools, SDK, NDK, emulator, and system image for Android. In an environment that can build Servo at all, this should be enough to get all additional dependencies to cross-compile to Android, package an APK, and load it onto a device or an emulator.

At the moment it requires an interactive user to accept the license (and confirm no customization of the emulated virtual device hardware), and then prints environment variables to set for mach as well as the command to run to start the emulator (with an already-configured image). A possible next step could be to automate all this, and have ./mach build run it automatically when needed. (I don’t know if auto-accepting the license is something we should do though.)

This also adds --emulator and --usb parameters to ./mach install --android and ./mach run --android, which tell adb what device to pick when both are present. And makes ./mach run --android print the new process’s PID, for use with e.g. adb -e logcat --pid 2263.

Finally, adds the ./mach boostrap-android subcommand which starts an emulator, installs the APK (it assumes that mach build and mach package were already executed), runs a single HTML test case, and checks for a message coming from JS through console.log() and adb logcat.


This change is Reviewable

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jun 25, 2018

r? @jdm

With this I can compile Servo and run it on an hardware phone and have web content show up on the screen. In the emulator however, I get a crash at startup and logcat contains RustAndroidGlueStdouterr: Failed to create window.: OsError("eglChooseConfig failed") (from glutin).

This means that none of the available EGL configurations satisfy what is requested by Glutin, but there is no error message to say more about this. I wrote a stand-alone program that is cross-compiled and run remotely by cargo run. It uses eglGetConfigs and eglGetConfigAttrib to print everything about every EGL configuration available. It shows that the answer is most likely the 0x40 bit of EGL_RENDERABLE_TYPE, which indicates support for OpenGL ES 3. It is requested by Glutin, and present in many of the 64 configs available on my Nexus 5x but none of the 4 configs on this emulator.

I am starting the emulator with -gpu swiftshader_indirect, which enables a software implementation of GL. (-gpu host also exists, but likely won’t work AWS servers without a hardware GPU and as far as I know only exists for Android x86.)

Release notes claim that the emulator gained a few versions ago support for GLES3 in Swiftshader, but "Extended controls" docs describes a configurable choice:

OpenGL ES API level: Select the maximum version of OpenGL ES to use in the emulator.

  • Autoselect: Let the emulator choose the OpenGL ES version based on the host and guest support.
  • Renderer maxium (up to OpenGL ES 3.1): Attempt to use the maximum version of OpenGL ES.
  • Compatibility (OpenGL ES 1.1/2.0): Use the version of OpenGL ES that is compatible with most environments.

Unfortunately this seems to be a GUI-only config, there is no command-line equivalent documented there.

I feel like I’m running out leads on the software-GL-in-emulator front. In the meantime I can run Servo on a hardware device to look at plumbing wptrunner and adb-logcat together.

@jdm

This comment has been minimized.

Copy link
Member

jdm commented Jun 26, 2018

I recommend using @paul as a resource, since I'm going to be returning to stealth vacation mode. However, are you able to run Servo in an emulator? I certainly was able to as part of my android-x86 work (on Mac), and it worked (slowly) for ARM builds too. One important change in my setup was using the most recent system image for the AVD device, rather than one that matched the API level that we build with.

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jun 26, 2018

No, eglChooseConfig doesn’t succeed in the emulator so I get a startup crash. That’s good to know re system image versions, I’ll try it. It’s likely that the emulator on mac was using your hardware GPU so we’d need to make a different configuration work, for CI. (Unless we want to run those jobs on macs, since they presumably have a GPU?)

r? @paul

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jun 26, 2018

No luck either with system-images;android-28;google_apis;x86, -gpu host and running under Xorg (which should be the "normal Linux desktop" case for accessing the hardware GPU).

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jun 26, 2018

Ah I see:

https://android-developers.googleblog.com/2017/05/android-studio-3-0-canary1.html

To use OpenGL ES 3.0 with the Android Emulator, your development machine needs a host GPU graphics card that supports OpenGL 3.2 or higher on Microsoft® Windows® or Linux (with Apple MacOS® support coming in the future).

But glxinfo|grep 'OpenGL version' on my dev machine is OpenGL version string: 3.0 Mesa 18.0.0-rc5

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jun 26, 2018

Success! When starting the emulator with -gpu guest (which is undocumented‽) and with this glutin patch tomaka/glutin#1036, I can get Servo to render web content in an emulator. It seems to even be working without an X11 server (and so without a hardware GPU), when also passing -no-window.

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jun 26, 2018

However this is with x86. Still no GLES3 on emulated ARM.

@paulrouget

This comment has been minimized.

Copy link
Contributor

paulrouget commented Jun 27, 2018

I'll be looking at this soon.

About the emulator, I never managed to get servo to work with an Arm emulator. As for x86, it works here both on Mac and linux.

Also, you copy pasted a typo multiple time: s/intall/install/

@paulrouget
Copy link
Contributor

paulrouget left a comment

I get this message:

Parsing /home/Paul/git/servo/android-toolchains/sdk-tools-linux-4333796/build-tools/25.0.2/package.xmlParsing /home/Paul/git/servo/android-toolchains/sdk-tools-linux-4333796/emulator/package.xmlParsing /home/Paul/git/servo/android-toolchains/sdk-tools-linux-4333796/patcher/v4/package.xmlParsing /home/Paul/git/servo/android-toolchains/sdk-tools-linux-4333796/platform-tools/package.xmlParsing /home/Paul/git/servo/android-toolchains/sdk-tools-linux-4333796/platforms/android-25/package.xmlParsing /home/Paul/git/servo/android-toolchains/sdk-tools-linux-4333796/system-images/android-25/google_apis/armeabi-v7a/package.xmlParsing /home/Paul/git/servo/android-toolchains/sdk-tools-linux-4333796/tools/package.xmlAuto-selecting single ABI armeabi-v7a

Do you wish to create a custom hardware profile? [no]

Can we skip it somehow?

After bootstrap, the exports and the command line to start the emulator are printed. Would be great to explain what these do and what to do with it.

Also, can we make it so that we don't have to manually export them? When running mach build --android, we should check if ANDROID_NDK/SDK is set, and if not, check if android-toolchains is present?

archive = path.join(toolchains, filename)

if not path.isfile(archive):
download_file(filename, url, archive)

This comment has been minimized.

@paulrouget

paulrouget Jun 28, 2018

Contributor

If the download gets interrupted, don't we need a way to force the download? Also, in the initial commit you were checking the md5 of the file. Can't we keep that?

This comment has been minimized.

@SimonSapin
"--name", avd_name,
"--package", image,
"--force",
])

This comment has been minimized.

@paulrouget

paulrouget Jun 28, 2018

Contributor

If I'm not mistaken, we need hardware acceleration for GLES 3 to work. Maybe we can test emulator -accel-check here to see if things will run fine.

This comment has been minimized.

@SimonSapin

SimonSapin Jun 28, 2018

Member

For using the host GPU, I think so. But that’s likely not the config we’ll use on CI.

api_level = "25"
sdk_build_tools = "25.0.2"
system_image = "google_apis;armeabi-v7a"
avd_name = "servo-armv7"

This comment has been minimized.

@paulrouget

paulrouget Jun 28, 2018

Contributor

Is it worth also creating the x86 emulator?

This comment has been minimized.

@SimonSapin
print("Cannot install to both emulator and USB at the same time.")
return 1
if emulator:
exec_command += ["-e"]

This comment has been minimized.

@paulrouget

paulrouget Jun 28, 2018

Contributor

Do we need a helper to start the emulator? We installed it. We push and run to the emulator. Maybe we should also start it somehow? Or test if it's running, and if not, check if the toolchain is present and print the command to run it.

This comment has been minimized.

@SimonSapin

SimonSapin Jun 28, 2018

Member

Added ./mach android-emulator which just forwards arguments to the emulator script. I’ll look later into having ./mach run start it automatically.

This comment has been minimized.

@SimonSapin

SimonSapin Jun 28, 2018

Member

One difficulty is that after starting the emulator and after adb wait-for-device returns (which shows that adb shell is responsive), the userland might not have finished booting yet. In particular, there is an indeterminate amount of time until the Activity Manager is running and the am start command would success. This time can be especially long for emulator ARM. (Or x86 without working CPU acceleration.)

os.remove(src)


def check_hash(filename, expected, algorithm):

This comment has been minimized.

@paulrouget

paulrouget Jun 28, 2018

Contributor

I don't think this is used anywhere.


[target.i686-linux-android]
linker = "./ld-i686.sh"
runner = "./run.sh"

This comment has been minimized.

@paulrouget

paulrouget Jun 28, 2018

Contributor

A note about this: in commit 58f93c2 I'm shuffling around the fakeld. And because we won't be using a binary hack anymore, we will be able to share the same fakeld between your PR and my PR (#20912).

This comment has been minimized.

@SimonSapin

SimonSapin Jun 29, 2018

Member

Per IRC discussion, I’ve removed all of egl-config now that it has served its purpose.

# USB
#target="-d"

path="${1}"

This comment has been minimized.

@paulrouget

paulrouget Jun 28, 2018

Contributor

Can you add a short readme in this directory to summarize what this is about.

This comment has been minimized.

@SimonSapin

SimonSapin Jun 29, 2018

Member

Per IRC discussion, I’ve removed all of egl-config now that it has served its purpose.

#21094 (comment) explains what this was about.

@@ -0,0 +1,10 @@
[build]
target = "i686-linux-android"

This comment has been minimized.

@paulrouget

paulrouget Jun 28, 2018

Contributor

Why not arm by default? We usually assume armv7-linux-androideabi by default.

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jun 28, 2018

Made the custom hardware profile prompt automatic and silent (but not the license acceptance, so far). Change bootstrap-android to not print the environment variables, and made mach pick them up automatically when the relevant directories exist.

@SimonSapin SimonSapin force-pushed the bootstrap-android branch from 7915668 to caf5f40 Jun 29, 2018

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jun 29, 2018

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jun 29, 2018

⌛️ Trying commit 390612a with merge 7e476ff...

bors-servo added a commit that referenced this pull request Jun 29, 2018

Auto merge of #21094 - servo:bootstrap-android, r=<try>
Add `./mach bootstrap-android` + EGL config diagnostics

This adds a `./mach boostrap-android` subcommand that downloads and installs the tools, SDK, NDK,  emulator, and system image for Android. In an environment that can build Servo at all, this should be enough to get all additional dependencies to cross-compile to Android, package an APK, and load it onto a device or an emulator.

At the moment it requires an interactive user to accept the license (and confirm no customization of the emulated virtual device hardware), and then prints environment variables to set for `mach` as well as the command to run to start the emulator (with an already-configured image). A possible next step could be to automate all this, and have `./mach build` run it automatically when needed. (I don’t know if auto-accepting the license is something we should do though.)

This also adds `--emulator` and `--usb` parameters to `./mach install --android` and `./mach run --android`, which tell `adb` what device to pick when both are present. And makes `./mach run --android` print the new process’s PID, for use with e.g. `adb -e logcat --pid 2263`.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21094)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jun 29, 2018

💔 Test failed - android

@SimonSapin SimonSapin force-pushed the bootstrap-android branch from 390612a to 4f08d98 Jun 29, 2018

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jun 29, 2018

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jun 29, 2018

⌛️ Trying commit 4f08d98 with merge 9c61332...

bors-servo added a commit that referenced this pull request Jun 29, 2018

Auto merge of #21094 - servo:bootstrap-android, r=<try>
Add `./mach bootstrap-android` + EGL config diagnostics

This adds a `./mach boostrap-android` subcommand that downloads and installs the tools, SDK, NDK,  emulator, and system image for Android. In an environment that can build Servo at all, this should be enough to get all additional dependencies to cross-compile to Android, package an APK, and load it onto a device or an emulator.

At the moment it requires an interactive user to accept the license (and confirm no customization of the emulated virtual device hardware), and then prints environment variables to set for `mach` as well as the command to run to start the emulator (with an already-configured image). A possible next step could be to automate all this, and have `./mach build` run it automatically when needed. (I don’t know if auto-accepting the license is something we should do though.)

This also adds `--emulator` and `--usb` parameters to `./mach install --android` and `./mach run --android`, which tell `adb` what device to pick when both are present. And makes `./mach run --android` print the new process’s PID, for use with e.g. `adb -e logcat --pid 2263`.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21094)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jun 29, 2018

💔 Test failed - mac-rel-wpt4

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jun 29, 2018

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/buildslave/runprocess.py", line 426, in start
    self._startCommand()
  File "/usr/local/lib/python2.7/dist-packages/buildslave/runprocess.py", line 550, in _startCommand
    usePTY=self.usePTY)
  File "/usr/local/lib/python2.7/dist-packages/buildslave/runprocess.py", line 572, in _spawnProcess
    processProtocol, uid, gid, childFDs)
  File "/usr/local/lib/python2.7/dist-packages/twisted/internet/process.py", line 728, in __init__
    self._fork(path, uid, gid, executable, args, environment, fdmap=fdmap)
  File "/usr/local/lib/python2.7/dist-packages/twisted/internet/process.py", line 405, in _fork
    self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory

On the builder (servo-linux-cross3) the process /usr/bin/python /usr/local/bin/buildslave start --nodaemon /home/servo/buildbot/slave uses 4.7 GB of memory (out of less than 8 available total) with the CPU being idle (no job running). On servo-linux-cross1 it’s 21 MB, for comparison.

CC @edunham, @aneeshusa

@asajeffrey

This comment has been minimized.

Copy link
Member

asajeffrey commented Jun 29, 2018

@SimonSapin you said you got Servo to run in the android emulator with tomaka/glutin#1036. It's merged into glutin 0.17.0, but compiling Servo with that version of glutin fails:

error[E0308]: mismatched types
   --> ports/servo/glutin_app/window.rs:214:47
    |
214 |             let glutin_window = GlWindow::new(window_builder, context_builder, &events_loop)
    |                                               ^^^^^^^^^^^^^^ expected struct `glutin::WindowBuilder`, found struct `winit::WindowBuilder`
    |
    = note: expected type `glutin::WindowBuilder`
               found type `winit::WindowBuilder`
note: Perhaps two different versions of crate `winit` are being used?
   --> ports/servo/glutin_app/window.rs:214:47
    |
214 |             let glutin_window = GlWindow::new(window_builder, context_builder, &events_loop)
    |                                               ^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> ports/servo/glutin_app/window.rs:214:80
    |
214 |             let glutin_window = GlWindow::new(window_builder, context_builder, &events_loop)
    |                                                                                ^^^^^^^^^^^^ expected struct `glutin::EventsLoop`, found struct `winit::EventsLoop`
    |
    = note: expected type `&glutin::EventsLoop`
               found type `&winit::EventsLoop`
note: Perhaps two different versions of crate `winit` are being used?
   --> ports/servo/glutin_app/window.rs:214:80
    |
214 |             let glutin_window = GlWindow::new(window_builder, context_builder, &events_loop)
    |                                                                                ^^^^^^^^^^^^

error[E0308]: mismatched types
   --> ports/servo/glutin_app/window.rs:224:17
    |
224 |             let (width, height) = glutin_window.get_inner_size().expect("Failed to get window inner size.");
    |                 ^^^^^^^^^^^^^^^ expected struct `glutin::dpi::LogicalSize`, found tuple
    |
    = note: expected type `glutin::dpi::LogicalSize`
               found type `(_, _)`

error[E0308]: mismatched types
   --> ports/servo/glutin_app/window.rs:297:21
    |
297 |                 let (_, height) = window.get_inner_size().expect("Failed to get window inner size.");
    |                     ^^^^^^^^^^^ expected struct `glutin::dpi::LogicalSize`, found tuple
    |
    = note: expected type `glutin::dpi::LogicalSize`
               found type `(_, _)`

error[E0061]: this function takes 1 parameter but 2 parameters were supplied
   --> ports/servo/glutin_app/window.rs:315:20
    |
315 |             window.set_inner_size(size.width as u32, size.height as u32)
    |                    ^^^^^^^^^^^^^^ expected 1 parameter

error[E0061]: this function takes 1 parameter but 2 parameters were supplied
   --> ports/servo/glutin_app/window.rs:322:20
    |
322 |             window.set_position(point.x as i32, point.y as i32)
    |                    ^^^^^^^^^^^^ expected 1 parameter

error[E0061]: this function takes 1 parameter but 2 parameters were supplied
   --> ports/servo/glutin_app/window.rs:540:28
    |
540 |                     window.resize(width, height);
    |                            ^^^^^^ expected 1 parameter

error[E0599]: no method named `hidpi_factor` found for type `&glutin::GlWindow` in the current scope
   --> ports/servo/glutin_app/window.rs:618:40
    |
618 |                 TypedScale::new(window.hidpi_factor())
    |                                        ^^^^^^^^^^^^
    |
    = help: did you mean `get_hidpi_factor`?

error[E0308]: mismatched types
   --> ports/servo/glutin_app/window.rs:677:35
    |
677 |                 window.set_cursor(winit_cursor);
    |                                   ^^^^^^^^^^^^ expected enum `glutin::MouseCursor`, found enum `winit::MouseCursor`
    |
    = note: expected type `glutin::MouseCursor`
               found type `winit::MouseCursor`
note: Perhaps two different versions of crate `winit` are being used?
   --> ports/servo/glutin_app/window.rs:677:35
    |
677 |                 window.set_cursor(winit_cursor);
    |                                   ^^^^^^^^^^^^

error[E0308]: mismatched types
   --> ports/servo/glutin_app/window.rs:694:21
    |
694 |                 let (width, height) = window.get_outer_size().expect("Failed to get window outer size.");
    |                     ^^^^^^^^^^^^^^^ expected struct `glutin::dpi::LogicalSize`, found tuple
    |
    = note: expected type `glutin::dpi::LogicalSize`
               found type `(_, _)`

error[E0308]: mismatched types
   --> ports/servo/glutin_app/window.rs:695:62
    |
695 |                 let (x, y) = window.get_position().unwrap_or((0, 0));
    |                                                              ^^^^^^ expected struct `glutin::dpi::LogicalPosition`, found tuple
    |
    = note: expected type `glutin::dpi::LogicalPosition`
               found type `({integer}, {integer})`

error[E0308]: mismatched types
   --> ports/servo/glutin_app/window.rs:695:21
    |
695 |                 let (x, y) = window.get_position().unwrap_or((0, 0));
    |                     ^^^^^^ expected struct `glutin::dpi::LogicalPosition`, found tuple
    |
    = note: expected type `glutin::dpi::LogicalPosition`
               found type `(_, _)`

error[E0308]: mismatched types
   --> ports/servo/glutin_app/window.rs:700:21
    |
700 |                 let (width, height) = window.get_inner_size().expect("Failed to get window inner size.");
    |                     ^^^^^^^^^^^^^^^ expected struct `glutin::dpi::LogicalSize`, found tuple
    |
    = note: expected type `glutin::dpi::LogicalSize`
               found type `(_, _)`

Did you cherry-pick that PR and apply it to glutin 0.13.1?

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jun 29, 2018

@asajeffrey I first made that PR on top of 0.13.1 and tested that in Servo. I then rebased it on top of upstream/master in order to add the changelog entry.

The correct fix is to update glutin to 0.17, but to get something running in the meantime try cherry-picking and using [patch]. (Glutin upstream unfortunately stopped making git tags for releases, 0.13.1 is 1b2d62c0e9c78c340953aeea79cfe7d087e36aa7.)

@SimonSapin SimonSapin changed the title Add `./mach bootstrap-android` + EGL config diagnostics Add `./mach bootstrap-android` and `./mach test-android-startup` Jun 29, 2018

@SimonSapin SimonSapin changed the title Add `./mach bootstrap-android` and `./mach test-android-startup` Add mach bootstrap-android and test-android-startup commands Jun 29, 2018

@SimonSapin SimonSapin force-pushed the bootstrap-android branch from 5a41d8e to c0d1b8e Jul 2, 2018

@taskcluster

This comment has been minimized.

Copy link

taskcluster bot commented on c0d1b8e Jul 2, 2018

Submitting the task to Taskcluster failed. Details

You do not have sufficient scopes. You are missing the following scopes:

{
"AnyOf": [
{
"AnyOf": [
"queue:create-task:highest:aws-provisioner-v1/servo-docker-worker",
"queue:create-task:very-high:aws-provisioner-v1/servo-docker-worker",
"queue:create-task:high:aws-provisioner-v1/servo-docker-worker",
"queue:create-task:medium:aws-provisioner-v1/servo-docker-worker",
"queue:create-task:low:aws-provisioner-v1/servo-docker-worker",
"queue:create-task:very-low:aws-provisioner-v1/servo-docker-worker",
"queue:create-task:lowest:aws-provisioner-v1/servo-docker-worker"
]
},
{
"AnyOf": [
"queue:create-task:aws-provisioner-v1/servo-docker-worker",
{
"AllOf": [
"queue:define-task:aws-provisioner-v1/servo-docker-worker",
"queue:task-group-id:taskcluster-github/T6LHeqIXR1u2HURPjegqfQ",
"queue:schedule-task:taskcluster-github/T6LHeqIXR1u2HURPjegqfQ/T6LHeqIXR1u2HURPjegqfQ"
]
}
]
}
]
}

You have the scopes:

\[
  "assume:project:taskcluster:mozilla\-github\-repository",
  "assume:repo:github.com/servo/servo:pull\-request",
  "notify:email:\*",
  "notify:irc\-channel:\*",
  "notify:irc\-user:\*",
  "queue:create\-task:aws\-provisioner\-v1/github\-worker",
  "queue:create\-task:aws\-provisioner\-v1/github\-worker\-windows",
  "queue:create\-task:aws\-provisioner\-v1/servo",
  "queue:create\-task:aws\-provisioner\-v1/win2012r2",
  "queue:route:garbage.\*",
  "queue:route:index.garbage.\*",
  "queue:route:notify.email.\*",
  "queue:route:notify.irc\-channel.\*",
  "queue:route:notify.irc\-user.\*",
  "queue:scheduler\-id:taskcluster\-github",
  "secrets:get:garbage/\*",
  "secrets:set:garbage/\*"
\]

This request requires you to satisfy this scope expression:

{
  "AllOf": \[
    {
      "AnyOf": \[
        {
          "AllOf": \[
            "queue:scheduler\-id:taskcluster\-github",
            {
              "AnyOf": \[
                "queue:create\-task:highest:aws\-provisioner\-v1/servo\-docker\-worker",
                "queue:create\-task:very\-high:aws\-provisioner\-v1/servo\-docker\-worker",
                "queue:create\-task:high:aws\-provisioner\-v1/servo\-docker\-worker",
                "queue:create\-task:medium:aws\-provisioner\-v1/servo\-docker\-worker",
                "queue:create\-task:low:aws\-provisioner\-v1/servo\-docker\-worker",
                "queue:create\-task:very\-low:aws\-provisioner\-v1/servo\-docker\-worker",
                "queue:create\-task:lowest:aws\-provisioner\-v1/servo\-docker\-worker"
              \]
            }
          \]
        },
        {
          "AnyOf": \[
            "queue:create\-task:aws\-provisioner\-v1/servo\-docker\-worker",
            {
              "AllOf": \[
                "queue:define\-task:aws\-provisioner\-v1/servo\-docker\-worker",
                "queue:task\-group\-id:taskcluster\-github/T6LHeqIXR1u2HURPjegqfQ",
                "queue:schedule\-task:taskcluster\-github/T6LHeqIXR1u2HURPjegqfQ/T6LHeqIXR1u2HURPjegqfQ"
              \]
            }
          \]
        }
      \]
    }
  \]
}

method: createTask
errorCode: InsufficientScopes
statusCode: 403
time: 2018-07-02T17:01:02.930Z

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jul 2, 2018

@bors-servo r=paul

Did you figure this out?

I’ve filed #21116 with some findings.

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jul 2, 2018

📌 Commit c0d1b8e has been approved by paul

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jul 2, 2018

⌛️ Testing commit c0d1b8e with merge 1f9b076...

bors-servo added a commit that referenced this pull request Jul 2, 2018

Auto merge of #21094 - servo:bootstrap-android, r=paul
Add mach bootstrap-android and test-android-startup commands

This adds a `./mach boostrap-android` subcommand that downloads and installs the tools, SDK, NDK,  emulator, and system image for Android. In an environment that can build Servo at all, this should be enough to get all additional dependencies to cross-compile to Android, package an APK, and load it onto a device or an emulator.

At the moment it requires an interactive user to accept the license (and confirm no customization of the emulated virtual device hardware), and then prints environment variables to set for `mach` as well as the command to run to start the emulator (with an already-configured image). A possible next step could be to automate all this, and have `./mach build` run it automatically when needed. (I don’t know if auto-accepting the license is something we should do though.)

This also adds `--emulator` and `--usb` parameters to `./mach install --android` and `./mach run --android`, which tell `adb` what device to pick when both are present. And makes `./mach run --android` print the new process’s PID, for use with e.g. `adb -e logcat --pid 2263`.

Finally, adds the `./mach boostrap-android` subcommand which starts an emulator, installs the APK (it assumes that `mach build` and `mach package` were already executed), runs a single HTML test case, and checks for a message coming from JS through `console.log()` and `adb logcat`.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21094)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jul 2, 2018

💔 Test failed - mac-rel-css2

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jul 2, 2018

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jul 2, 2018

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jul 2, 2018

💔 Test failed - mac-rel-css1

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jul 2, 2018

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jul 2, 2018

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jul 2, 2018

💔 Test failed - mac-rel-wpt2

@SimonSapin

This comment has been minimized.

Copy link
Member

SimonSapin commented Jul 2, 2018

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jul 2, 2018

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jul 2, 2018

@bors-servo bors-servo merged commit c0d1b8e into master Jul 2, 2018

4 of 5 checks passed

Taskcluster (pull_request) TaskGroup: Exception
Details
Tidelift Dependencies checked
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@bors-servo bors-servo referenced this pull request Jul 2, 2018

Merged

Revisit how the Android port works. #20912

0 of 5 tasks complete

@SimonSapin SimonSapin deleted the bootstrap-android branch Jul 2, 2018

SimonSapin added a commit that referenced this pull request Jul 4, 2018

Update README for Android
#21094 automates some things.

bors-servo added a commit that referenced this pull request Jul 5, 2018

Auto merge of #21125 - servo:android-readme, r=paulrouget
Update README for Android

#21094 automates some things.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21125)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment