aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xsrc/test/shell/bazel/test-setup.sh4
-rw-r--r--tools/android/android_sdk_repository_template.bzl18
2 files changed, 18 insertions, 4 deletions
diff --git a/src/test/shell/bazel/test-setup.sh b/src/test/shell/bazel/test-setup.sh
index b615227c7f..7577d15585 100755
--- a/src/test/shell/bazel/test-setup.sh
+++ b/src/test/shell/bazel/test-setup.sh
@@ -65,9 +65,7 @@ function setup_android_support() {
done
for i in $SDK_SRCDIR/*; do
- if [[ "$(basename $i)" != "BUILD" ]]; then
- ln -s "$i" "$ANDROID_SDK/$(basename $i)"
- fi
+ ln -s "$i" "$ANDROID_SDK/$(basename $i)"
done
diff --git a/tools/android/android_sdk_repository_template.bzl b/tools/android/android_sdk_repository_template.bzl
index 3557ff8a2b..e481fb82e0 100644
--- a/tools/android/android_sdk_repository_template.bzl
+++ b/tools/android/android_sdk_repository_template.bzl
@@ -28,9 +28,25 @@ def create_android_sdk_rules(
api_level: int, the API level from which to get android.jar et al.
"""
+ # This filegroup is used to pass the contents of the SDK to the Android
+ # integration tests. We need to glob because not all of these folders ship
+ # with the Android SDK, some need to be installed through the SDK Manager.
+ # Since android_sdk_repository function generates BUILD files, we do not want
+ # to include those because the integration test would fail when it tries to
+ # regenerate those BUILD files because the Bazel Sandbox does not allow
+ # overwriting existing files.
native.filegroup(
name = "files",
- srcs = ["."],
+ srcs = native.glob([
+ "add-ons",
+ "build-tools",
+ "extras",
+ "platforms",
+ "platform-tools",
+ "sources",
+ "system-images",
+ "tools",
+ ]),
)
native.java_import(