load(":android_sh_test.bzl", "android_sh_test") filegroup( name = "srcs", srcs = glob(["**"]), visibility = ["//src/test/shell/bazel:__pkg__"], ) # These tests rely on the //external:android_{s,n}dk_for_testing filegroups. # These targets should point to filegroups containing the contents of # the Android SDK and NDK. They *must not* contain any BUILD files that # are generated by Android{S,N}dkRepositoryFunction, or else the # integration will attempt to overwrite those files and fail. Note that # this is incorrect because the filegroups should contain all of the # files needed, but since they contain files with names that are not # legal Bazel labels, there isn't really a better option. # # The definitions of these filegroups are in # tools/android/android_sdk_repository_template.bzl and # src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_ndk_build_file_template.txt sh_library( name = "android_helper", srcs = ["android_helper.sh"], data = [ "sample.aar", "@bazel_tools//tools/bash/runfiles", ], ) android_sh_test( name = "android_integration_test", size = "enormous", srcs = ["android_integration_test.sh"], data = [ ":android_helper", "//external:android_sdk_for_testing", "//src/test/shell/bazel:test-deps", ], tags = [ # See https://github.com/bazelbuild/bazel/issues/18431. "no-remote", "no_windows", # bzlmod test requires network "requires-network", ], ) android_sh_test( name = "android_local_test_integration_test", size = "large", srcs = ["android_local_test_integration_test.sh"], data = [ ":android_helper", "//external:android_sdk_for_testing", "//src/test/shell/bazel:test-deps", ], tags = [ "no_windows", ], ) android_sh_test( name = "aapt_integration_test", size = "large", srcs = ["aapt_integration_test.sh"], data = [ ":android_helper", "//external:android_sdk_for_testing", "//src/test/shell/bazel:test-deps", ], ) android_sh_test( name = "aar_integration_test", size = "large", srcs = ["aar_integration_test.sh"], data = [ ":android_helper", "//external:android_ndk_for_testing", "//external:android_sdk_for_testing", "//src/test/shell/bazel:test-deps", ], tags = [ # See https://github.com/bazelbuild/bazel/issues/17784. "no-remote", "no_windows", ], ) android_sh_test( name = "proguard_integration_test", size = "medium", srcs = ["proguard_integration_test.sh"], data = [ ":android_helper", "//external:android_sdk_for_testing", "//src/test/shell/bazel:test-deps", ], ) android_sh_test( name = "android_sdk_integration_test", size = "large", srcs = ["android_sdk_integration_test.sh"], data = [ ":android_helper", "//external:android_sdk_for_testing", "//src/test/shell/bazel:test-deps", ], shard_count = 3, tags = [ "no_windows", ], ) android_sh_test( name = "android_ndk_integration_test", size = "medium", timeout = "long", srcs = ["android_ndk_integration_test.sh"], data = [ ":android_helper", "//external:android_ndk_for_testing", "//external:android_sdk_for_testing", "//src/test/shell/bazel:test-deps", ], shard_count = 6, tags = [ # See https://github.com/bazelbuild/bazel/issues/17784. "no-remote", "no_windows", ], ) android_sh_test( name = "aidl_integration_test", size = "medium", srcs = ["aidl_integration_test.sh"], data = [ ":android_helper", "//external:android_sdk_for_testing", "//src/test/shell/bazel:test-deps", ], ) android_sh_test( name = "desugarer_integration_test", size = "large", srcs = ["desugarer_integration_test.sh"], data = [ ":android_helper", "//external:android_sdk_for_testing", "//src/test/shell/bazel:test-deps", ], tags = [ "no_windows", ], ) android_sh_test( name = "android_instrumentation_test_integration_test", size = "medium", srcs = ["android_instrumentation_test_integration_test.sh"], data = [ ":android_helper", "//external:android_sdk_for_testing", "//src/test/shell/bazel:test-deps", ], shard_count = 4, tags = [ "no_windows", ], ) android_sh_test( name = "resource_processing_integration_test", size = "large", srcs = ["resource_processing_integration_test.sh"], data = [ ":android_helper", ":testdata/roboto.ttf", "//external:android_sdk_for_testing", "//src/test/shell/bazel:test-deps", ], ) android_sh_test( name = "DexFileSplitter_synthetic_classes_test", size = "large", srcs = ["DexFileSplitter_synthetic_classes_test.sh"], # Fixes to DexMapper are not released yet. create_test_with_released_tools = False, data = [ ":android_helper", "//external:android_sdk_for_testing", "//src/test/shell/bazel:test-deps", ], shard_count = 2, tags = [ "no_windows", ], )