1# Description: 2# Tests for android_sdk_repository. 3 4load("@bazel_binaries//:defs.bzl", "bazel_binaries") 5load( 6 "@rules_bazel_integration_test//bazel_integration_test:defs.bzl", 7 "script_test", 8) 9 10package( 11 default_applicable_licenses = ["//:license"], 12 default_visibility = [ 13 "//test:__subpackages__", 14 ], 15) 16 17licenses(["notice"]) 18 19sh_library( 20 name = "android_helper", 21 testonly = True, 22 srcs = ["android_helper.sh"], 23 data = [ 24 "//rules/android_sdk_repository:bzl", 25 ], 26 visibility = ["//visibility:private"], 27 deps = [ 28 "//test/bashunit", 29 "@bazel_tools//tools/bash/runfiles", 30 ], 31) 32 33sh_library( 34 name = "test_lib", 35 testonly = True, 36 srcs = ["test_lib.sh"], 37 visibility = ["//visibility:private"], 38 deps = [ 39 ":android_helper", 40 "//test/bashunit", 41 "@bazel_tools//tools/bash/runfiles", 42 ], 43) 44 45script_test( 46 name = "android_sdk_repository_test", 47 srcs = ["android_sdk_repository_test.sh"], 48 bazel_binaries = bazel_binaries, 49 bazel_version = bazel_binaries.versions.current, 50 deps = [ 51 ":test_lib", 52 "//test/bashunit", 53 "@bazel_tools//tools/bash/runfiles", 54 ], 55) 56 57script_test( 58 name = "android_sdk_repository_platforms_test", 59 srcs = ["android_sdk_repository_platforms_test.sh"], 60 bazel_binaries = bazel_binaries, 61 bazel_version = bazel_binaries.versions.current, 62 deps = [ 63 ":test_lib", 64 "//test/bashunit", 65 "@bazel_tools//tools/bash/runfiles", 66 ], 67) 68 69test_suite( 70 name = "integration_tests", 71 tests = [ 72 ":android_sdk_repository_platforms_test", 73 ":android_sdk_repository_test", 74 ], 75) 76