diff options
author | ajmichael <ajmichael@google.com> | 2017-04-12 01:34:08 +0000 |
---|---|---|
committer | Jakob Buchgraber <buchgr@google.com> | 2017-04-12 11:49:11 +0200 |
commit | 8d876cf3ac18a0563828f4d66a48b84c957c55fb (patch) | |
tree | fcd135c9a144ab4774c20e93a9a71fa8751e5585 /src/test | |
parent | 2e1b904c3016409ad30a289a796a4711476b9814 (diff) |
Make android_sdk_repository generate filegroups containing system image files for all android system images installed in the SDK. For system images that are not installed, create genrule "poison pills" that print a helpful error message if you attempt to build them.
These filegroups are intended to be used as the system_image attribute of the android_device rule.
Example:
$ bazel build @android_test_support//tools/android/emulated_devices/pixel:android_25_x86
Extracting Bazel installation...
.
INFO: Found 1 target...
ERROR: /usr/local/google/home/ajmichael/.cache/bazel/_bazel_ajmichael/efa32264346ef1fc4fec492202b88b31/external/androidsdk/BUILD.bazel:56:1: Executing genrule @androidsdk//:emulator_images_android_25_x86 failed: Process exited with status 1 [sandboxed].
This rule requires that the Android SDK used by Bazel has the following system image installed: emulator_images_android_25_x86. Please install this system image through the Android SDK Manager and try again.
RELNOTES: None
PiperOrigin-RevId: 152889824
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/bazel/rules/android/AndroidSdkRepositoryTest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/bazel/rules/android/AndroidSdkRepositoryTest.java b/src/test/java/com/google/devtools/build/lib/bazel/rules/android/AndroidSdkRepositoryTest.java index fd64a4a8ca..47554ecdca 100644 --- a/src/test/java/com/google/devtools/build/lib/bazel/rules/android/AndroidSdkRepositoryTest.java +++ b/src/test/java/com/google/devtools/build/lib/bazel/rules/android/AndroidSdkRepositoryTest.java @@ -128,7 +128,7 @@ public class AndroidSdkRepositoryTest extends BuildViewTestCase { invalidatePackages(); ConfiguredTarget android25ArmFilegroup = - getConfiguredTarget("@androidsdk//:android-25_default_armeabi-v7a_files"); + getConfiguredTarget("@androidsdk//:emulator_images_android_25_arm"); assertThat(android25ArmFilegroup).isNotNull(); assertThat( artifactsToStrings( @@ -137,7 +137,7 @@ public class AndroidSdkRepositoryTest extends BuildViewTestCase { "src external/androidsdk/system-images/android-25/default/armeabi-v7a/system.img"); ConfiguredTarget android24X86Filegroup = - getConfiguredTarget("@androidsdk//:android-24_google_apis_x86_files"); + getConfiguredTarget("@androidsdk//:emulator_images_google_24_x86"); assertThat(android24X86Filegroup).isNotNull(); assertThat( artifactsToStrings( |