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

misc/android: go_android_exec fails to copy other package sources in the main module when executing tests #37088

Open
bcmills opened this issue Feb 6, 2020 · 0 comments
Labels
help wanted mobile Android, iOS, and x/mobile NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Feb 6, 2020

In order to ensure that a test binary can find any associated test data, go test runs the resulting test binary in its own source directory.

That implies that, if a go binary is present, the test can go build both files in its own directory and any associated packages in the same module.

Unfortunately, adbCopyTree function in go_android_exec.go does not ensure that the source code for the complete module is present. Instead, it copies only the go.mod and go.sum files and testdata directories going up the tree.

That implies that go_android_exec cannot successfully execute an external test that runs an associated main package as a subprocess if that main package imports any other package outside of the standard library, such as in CL 218277.

CC @hajimehoshi @hyangah @steeve @eliasnaur

@bcmills bcmills added help wanted NeedsFix The path to resolution is known, but the work has not been done. mobile Android, iOS, and x/mobile labels Feb 6, 2020
@bcmills bcmills added this to the Backlog milestone Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted mobile Android, iOS, and x/mobile NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

1 participant