-
Notifications
You must be signed in to change notification settings - Fork 3.9k
/
BUILD
216 lines (203 loc) · 6.52 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
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 = "large",
srcs = ["android_integration_test.sh"],
data = [
":android_helper",
# TODO(b/226204219): Remove this dep once Bazel properly loads d8
# in create_android_sdk_rules()
"//external:android/d8_jar_import",
"//external:android_sdk_for_testing",
"//src/test/shell/bazel:test-deps",
],
# See https://github.com/bazelbuild/bazel/issues/8235
tags = [
"no-remote",
"no_windows",
# bzlmod test requires network
"requires-network",
],
)
android_sh_test(
name = "aapt_integration_test",
size = "large",
srcs = ["aapt_integration_test.sh"],
data = [
":android_helper",
# TODO(b/226204219): Remove this dep once Bazel properly loads d8
# in create_android_sdk_rules()
"//external:android/d8_jar_import",
"//external:android_sdk_for_testing",
"//src/test/shell/bazel:test-deps",
],
# See https://github.com/bazelbuild/bazel/issues/8235
tags = ["no-remote"],
)
android_sh_test(
name = "aar_integration_test",
size = "large",
srcs = ["aar_integration_test.sh"],
data = [
":android_helper",
"//external:android_ndk_for_testing",
# TODO(b/226204219): Remove this dep once Bazel properly loads d8
# in create_android_sdk_rules()
"//external:android/d8_jar_import",
"//external:android_sdk_for_testing",
"//src/test/shell/bazel:test-deps",
],
# See https://github.com/bazelbuild/bazel/issues/8235
tags = [
"no-remote",
"no_windows",
],
)
android_sh_test(
name = "proguard_integration_test",
size = "medium",
srcs = ["proguard_integration_test.sh"],
data = [
":android_helper",
# TODO(b/226204219): Remove this dep once Bazel properly loads d8
# in create_android_sdk_rules()
"//external:android/d8_jar_import",
"//external:android_sdk_for_testing",
"//src/test/shell/bazel:test-deps",
],
# See https://github.com/bazelbuild/bazel/issues/8235
tags = ["no-remote"],
)
android_sh_test(
name = "android_sdk_integration_test",
size = "medium",
srcs = ["android_sdk_integration_test.sh"],
data = [
":android_helper",
# TODO(b/226204219): Remove this dep once Bazel properly loads d8
# in create_android_sdk_rules()
"//external:android/d8_jar_import",
"//external:android_sdk_for_testing",
"//src/test/shell/bazel:test-deps",
],
shard_count = 3,
# See https://github.com/bazelbuild/bazel/issues/8235
tags = [
"no-remote",
"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",
# TODO(b/226204219): Remove this dep once Bazel properly loads d8
# in create_android_sdk_rules()
"//external:android/d8_jar_import",
"//external:android_sdk_for_testing",
"//src/test/shell/bazel:test-deps",
],
shard_count = 6,
# See https://github.com/bazelbuild/bazel/issues/8235
tags = [
"no-remote",
"no_windows",
],
)
android_sh_test(
name = "aidl_integration_test",
size = "medium",
srcs = ["aidl_integration_test.sh"],
data = [
":android_helper",
# TODO(b/226204219): Remove this dep once Bazel properly loads d8
# in create_android_sdk_rules()
"//external:android/d8_jar_import",
"//external:android_sdk_for_testing",
"//src/test/shell/bazel:test-deps",
],
# See https://github.com/bazelbuild/bazel/issues/8235
tags = ["no-remote"],
)
android_sh_test(
name = "desugarer_integration_test",
size = "medium",
srcs = ["desugarer_integration_test.sh"],
data = [
":android_helper",
# TODO(b/226204219): Remove this dep once Bazel properly loads d8
# in create_android_sdk_rules()
"//external:android/d8_jar_import",
"//external:android_sdk_for_testing",
"//src/test/shell/bazel:test-deps",
],
# See https://github.com/bazelbuild/bazel/issues/8235
tags = [
"no-remote",
"no_windows",
],
)
android_sh_test(
name = "android_instrumentation_test_integration_test",
size = "medium",
srcs = ["android_instrumentation_test_integration_test.sh"],
data = [
":android_helper",
# TODO(b/226204219): Remove this dep once Bazel properly loads d8
# in create_android_sdk_rules()
"//external:android/d8_jar_import",
"//external:android_sdk_for_testing",
"//src/test/shell/bazel:test-deps",
],
shard_count = 4,
# See https://github.com/bazelbuild/bazel/issues/8235
tags = [
"no-remote",
"no_windows",
],
)
android_sh_test(
name = "resource_processing_integration_test",
size = "large",
srcs = ["resource_processing_integration_test.sh"],
data = [
":android_helper",
":testdata/roboto.ttf",
# TODO(b/226204219): Remove this dep once Bazel properly loads d8
# in create_android_sdk_rules()
"//external:android/d8_jar_import",
"//external:android_sdk_for_testing",
"//src/test/shell/bazel:test-deps",
],
# See https://github.com/bazelbuild/bazel/issues/8235
tags = ["no-remote"],
)