-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Testing local bazel doesn't work without android sdk #2559
Comments
When running the tests under //src/..., the tests for Android are also started. I'm not sure it would be a good idea to disable these tests by default, but rather improve our documentation on what basic tests to run, depending on whether the user is interested or not in Android. Here are the instructions for running the Android tests. |
@iirina thanks! |
I'm adding @aj-michael for Android support and @steren for the documentation part. |
Exactly the android set up is the part I don't want to do.
Now, it might be totally valid to require it before making a contribution
but I'm not sure it's actually needed.
…On Tue, 21 Feb 2017 at 15:44 Irina Iancu ***@***.***> wrote:
/WORKSPACE.user is a file created by scripts/workspace_user.sh containing
generated android_ndk_repository and android_sdk_repository rules. But
yes you are right, you need to hame some environment variables set up
(ANDROID_HOME, ANDROID_SDK, ANDROID_NDK) that also means you have to have
Android set up.
I'm adding @aj-michael <https://github.com/aj-michael> for Android
support and @steren <https://github.com/steren> for the documentation
part.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2559 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIFwZxop8u50FccuUBtRS6y0DU2h8uks5reupNgaJpZM4MHIXh>
.
|
adding @michelleirvine, the owner of our documentation |
There is some confusion here, the error that you got is not due to an Android test, it is due to building an Android tool:
You want to use the https://github.com/bazelbuild/bazel/blob/master/compile.sh#L218 We should update the documentation to include this flag. |
Fair enough.
…On Tue, 21 Feb 2017 at 17:47 Adam Michael ***@***.***> wrote:
There is some confusion here, the error that you got is not due to an
Android *test*, it is due to building an Android *tool*:
//src/tools/android/java/com/google/devtools/build/android/incrementaldeployment:incremental_split_stub_application
You want to use the --build_tests_only flag and everything should be ok.
You can see the full list of flags for this step here:
https://github.com/bazelbuild/bazel/blob/master/compile.sh#L218
We should update the documentation to include this flag.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2559 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF85ZPActdOXBTIA7wLAt1H7dhrJdks5rewccgaJpZM4MHIXh>
.
|
While we're on the topic though, I should mention that //src/test/shell/bazel/android:android_integration_test will run and silently skip all the tests and return a pass if an android sdk and android ndk are not installed. I've been doing some work to make the process of setting up android_sdk_repository and android_ndk_repository be less of a burden in #2284, but it's not quite done yet. At some point, I would like to make android_integration_test fail if no Android SDK is installed, to prevent people from committing Android-related code while forgetting to run these tests. @ittaiz I would be curious to hear your perspective on how you think we could best handle the android tests for people who do not have an Android SDK on hand. |
I think it really depends on how easy you want to make it for accidental
contributors (who I assume usually don't touch android related code) vs
regular maintainers and are you willing to defer some of the feedback loop
to CI.
If you want to optimize for accidental contributors and are willing to
defer to CI why not fail these only when a flag is turned on and turn it on
by default on CI.
Regular maintainers will also have it turned in via bazelrc or something
…On Tue, 21 Feb 2017 at 19:47 Adam Michael ***@***.***> wrote:
While we're on the topic though, I should mention that
//src/test/shell/bazel/android:android_integration_test will run and
silently skip all the tests and return a pass if an android sdk and android
ndk are not installed. I've been doing some work to make the process of
setting up android_sdk_repository and android_ndk_repository be less of a
burden in #2284 <#2284>, but
it's not quite done yet.
At some point, I would like to make android_integration_test fail if no
Android SDK is installed, to prevent people from committing Android-related
code while forgetting to run these tests. @ittaiz
<https://github.com/ittaiz> I would be curious to hear your perspective
on how you think we could best handle the android tests for people who do
not have an Android SDK on hand.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2559 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUIF88Ogl70G8waRVKYU9fvuGHjljgBks5reyMvgaJpZM4MHIXh>
.
|
These targets are unneeded and do not build without an android_sdk_repository set up. This issue was identified in #2559. -- PiperOrigin-RevId: 148251416 MOS_MIGRATED_REVID=148251416
As of 65b49a2, |
Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.
Description of the problem / feature request / question:
I'm trying to follow the instructions on compiling bazel but it seems that without android sdk this doesn't work
If possible, provide a minimal example to reproduce the problem:
Environment info
Operating System:
OS X El-Capitan 10.11.6
Bazel version (output of
bazel info release
):development version
bazel info release
returns "development version" or "(@non-git)", please tell us what source tree you compiled Bazel from; git commit hash is appreciated (git rev-parse HEAD
):54b9d2c
Have you found anything relevant by searching the web? (e.g. GitHub issues, email threads in the bazel-discuss@googlegroups.com archive)
Anything else, information or logs or outputs that would be helpful?
(If they are large, please upload as attachment or provide link).
#509 is related but it just wants the error message to be better. I would rather drop android sdk as a requirement.
The text was updated successfully, but these errors were encountered: