aboutsummaryrefslogtreecommitdiff
path: root/test/rules/android_sdk_repository/test_lib.sh
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-10-10 01:06:58 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-10-10 01:06:58 +0000
commit91f5a4960f3c73a5e59b27bcc2f8ee4c31b08fc8 (patch)
treea58049c9682d6fd38e8408479340bf3911b87515 /test/rules/android_sdk_repository/test_lib.sh
parentbc67c32f96ccf8d0c503a88cbbf7b7ae91559be3 (diff)
parent9e965d6fece27a77de5377433c2f7e6999b8cc0b (diff)
downloadbazelbuild-rules_android-91f5a4960f3c73a5e59b27bcc2f8ee4c31b08fc8.tar.gz
Change-Id: Ic28eeddca3097c154d1283e0670dc1c497bfc08b
Diffstat (limited to 'test/rules/android_sdk_repository/test_lib.sh')
-rw-r--r--test/rules/android_sdk_repository/test_lib.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/rules/android_sdk_repository/test_lib.sh b/test/rules/android_sdk_repository/test_lib.sh
index 17d2485..a5abbba 100644
--- a/test/rules/android_sdk_repository/test_lib.sh
+++ b/test/rules/android_sdk_repository/test_lib.sh
@@ -33,6 +33,21 @@ source "$(rlocation rules_android/test/rules/android_sdk_repository/android_help
# Actual tests for Android Sdk Repository
+# Test that the dummy SDK exists.
+function test_dummy_sdk() {
+ # Create android SDK
+ local sdk_path="$(create_android_sdk_basic)"
+
+ cat >> WORKSPACE <<EOF
+android_sdk_repository(
+ name = "androidsdk",
+ path = "${sdk_path}",
+)
+EOF
+
+ "${BIT_BAZEL_BINARY}" query @androidsdk//:sdk-dummy >& $TEST_log || fail "Dummy SDK missing"
+}
+
# Check that the empty BUILD file was created.
function test_android_sdk_repository_no_path_or_android_home() {
cat >> WORKSPACE <<EOF