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

bcmills opened this issue Feb 6, 2020 · 0 comments


Copy link

@bcmills 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant