Skip to content
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

x/mobile: get Android builders passing on x/mobile #30482

Closed
bradfitz opened this issue Feb 28, 2019 · 6 comments

Comments

Projects
None yet
3 participants
@bradfitz
Copy link
Member

commented Feb 28, 2019

We now have x/mobile running on Android emulators on GCE and the first results are in:

https://build.golang.org/log/63ae018cd1092f5750d53441636171d48aeb8836

Looks like there's some cleanup to do, but not terrible.

We don't yet have those being used for mobile trybots, but we should.

@eliasnaur

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

I will fix the test failures, but their root cause is trickier: the android builders run with GOOS=android which means that the tests run on the device. So we don't get to run the interesting tests (host builds an Android apk, pushes it to the device and runs it).

So the builder should (also?) somehow run with GOOS=$GOHOSTOS for the x/mobile repository. What do you think?

@bradfitz

This comment has been minimized.

Copy link
Member Author

commented Mar 1, 2019

I guess we could special case that. I'd reuse the existing buildlets & just run "go test" twice with different env. The host tools should already be compiled from the make.bash. Can you verify that works in a local docker container? That is: a GOOS=android make.bash followed by an x/mobile GOOS=linux go test?

@gopherbot

This comment has been minimized.

Copy link

commented Mar 1, 2019

Change https://golang.org/cl/164740 mentions this issue: dashboard: add a GOOS=linux builder & trybot for Android

gopherbot pushed a commit to golang/build that referenced this issue Mar 1, 2019

dashboard: add a GOOS=linux builder & trybot for Android
Updates golang/go#30482

Change-Id: I198dd40dfdb86b20e681c373141754680351e82f
Reviewed-on: https://go-review.googlesource.com/c/164740
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Elias Naur <mail@eliasnaur.com>
@eliasnaur

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

I guess we could special case that. I'd reuse the existing buildlets & just run "go test" twice with different env. The host tools should already be compiled from the make.bash. Can you verify that works in a local docker container? That is: a GOOS=android make.bash followed by an x/mobile GOOS=linux go test?

Works for me with a variant of the Dockerfile from https://go-review.googlesource.com/c/build/+/164658.

@gopherbot

This comment has been minimized.

Copy link

commented Mar 1, 2019

Change https://golang.org/cl/164660 mentions this issue: dashboard: add x/mobile builder that runs on the host with device attached

@gopherbot

This comment has been minimized.

Copy link

commented Mar 1, 2019

Change https://golang.org/cl/164799 mentions this issue: all: skip or fix tests for GOOS=android

gopherbot pushed a commit to golang/build that referenced this issue Mar 5, 2019

dashboard: add x/mobile builder that runs on the host with device att…
…ached

When running GOOS=android go test <pkg>, the go tool will build the test(s)
for Android and run it through the exec wrapper. The exec wrappers takes care
of pushing the binary to the device and running it. That's how the normal
builder with an Android device attached works: setting GOOS=android.

Some x/mobile tests uses the Android SDK and then use an Android specific way
to run integration tests with Java. Those tests don't run on GOOS=android.

To solve that dilemma, define a special builder without GOOS=android set
and use it (only) for x/mobile.
Then, disable the GOOS=android builder for x/mobile to avoid wasting
device time better spent on the main repository.

Similar to CL 164740.

While here, correct two GOHOSTOS values and rename the existing
android builders to match the GOOS-GOARCH-suffix form.

Updates golang/go#30482

Change-Id: I3712584c62c3765d5605cccb642aa6f119826ae8
Reviewed-on: https://go-review.googlesource.com/c/build/+/164660
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.