blob: 7b2c290ce5bb5e9663d089660ebb0910285fff8b [file] [log] [blame]
Tao Bao30e31142019-04-09 00:12:30 -07001// Copyright (C) 2019 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Tao Bao3c7b2a62019-08-07 12:24:20 -070015//
16// Module-specific defaults.
17//
18// For module X, if we need to build it both as a library and an executable:
19// - A default rule `releasetools_X_defaults` is created, which lists `srcs`, `libs` and
20// `required` properties.
21// - `python_library_host` and `python_binary_host` are created by listing
22// `releasetools_X_defaults` in their defaults.
23//
24
Bob Badour03905802021-02-12 21:42:54 -080025package {
26 default_applicable_licenses: ["Android-Apache-2.0"],
27}
28
Tao Bao3c7b2a62019-08-07 12:24:20 -070029python_defaults {
30 name: "releasetools_add_img_to_target_files_defaults",
31 srcs: [
32 "add_img_to_target_files.py",
33 ],
34 libs: [
Kelvin Zhang5f0fcee2021-01-19 15:30:46 -050035 "ota_metadata_proto",
36 "releasetools_apex_utils",
Tao Bao3c7b2a62019-08-07 12:24:20 -070037 "releasetools_build_image",
38 "releasetools_build_super_image",
39 "releasetools_common",
40 ],
41 required: [
42 "care_map_generator",
43 ],
44}
45
46python_defaults {
47 name: "releasetools_build_image_defaults",
48 srcs: [
49 "build_image.py",
50 ],
51 libs: [
52 "releasetools_common",
Inseob Kim9cda3972021-10-12 22:59:12 +090053 "releasetools_fsverity_metadata_generator",
Tao Bao3c7b2a62019-08-07 12:24:20 -070054 "releasetools_verity_utils",
55 ],
56 required: [
57 "blk_alloc_to_base_fs",
58 "e2fsck",
Gao Xiang961041a2020-06-17 13:59:16 +080059 "mkerofsimage.sh",
Yifan Hong77023452020-08-25 16:15:16 -070060 "mkuserimg_mke2fs",
Tao Bao3c7b2a62019-08-07 12:24:20 -070061 "simg2img",
62 "tune2fs",
Jaegeuk Kim1f50a362021-06-08 18:24:46 -070063 "mkf2fsuserimg.sh",
64 "fsck.f2fs",
Tao Bao3c7b2a62019-08-07 12:24:20 -070065 ],
66}
67
68python_defaults {
69 name: "releasetools_build_super_image_defaults",
70 srcs: [
71 "build_super_image.py",
72 ],
73 libs: [
74 "releasetools_common",
75 ],
76}
77
78python_defaults {
79 name: "releasetools_img_from_target_files_defaults",
80 srcs: [
81 "img_from_target_files.py",
82 ],
83 libs: [
84 "releasetools_build_super_image",
85 "releasetools_common",
86 ],
87}
88
89python_defaults {
Yifan Honge3ba82c2019-08-21 13:29:30 -070090 name: "releasetools_check_target_files_vintf_defaults",
91 srcs: [
92 "check_target_files_vintf.py",
93 ],
94 libs: [
95 "releasetools_common",
96 ],
97 required: [
98 "checkvintf",
99 ],
100}
101
Tianjiea2076132020-08-19 17:25:32 -0700102python_library_host {
103 name: "ota_metadata_proto",
Tianjiea2076132020-08-19 17:25:32 -0700104 srcs: [
105 "ota_metadata.proto",
106 ],
107 proto: {
108 canonical_path_from_root: false,
109 },
110}
111
Kelvin Zhanga3a74b62021-05-14 17:18:43 -0400112cc_library_static {
113 name: "ota_metadata_proto_cc",
114 srcs: [
115 "ota_metadata.proto",
116 ],
117 host_supported: true,
118 recovery_available: true,
119 proto: {
120 canonical_path_from_root: false,
121 type: "lite",
122 export_proto_headers: true,
123 },
124}
125
Kelvin Zhang2b6a9c32021-04-12 17:24:26 -0400126java_library_static {
127 name: "ota_metadata_proto_java",
128 host_supported: true,
129 proto: {
130 type: "nano",
131 },
132 srcs: ["ota_metadata.proto"],
133 sdk_version: "9",
134 target: {
135 android: {
136 jarjar_rules: "jarjar-rules.txt",
137 },
138 host: {
139 static_libs: ["libprotobuf-java-nano"],
140 },
141 },
142 visibility: ["//frameworks/base:__subpackages__"]
143}
144
Yifan Honge3ba82c2019-08-21 13:29:30 -0700145python_defaults {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700146 name: "releasetools_ota_from_target_files_defaults",
147 srcs: [
148 "edify_generator.py",
Kelvin Zhangcff4d762020-07-29 16:37:51 -0400149 "non_ab_ota.py",
Tianjiea2076132020-08-19 17:25:32 -0700150 "ota_from_target_files.py",
Kelvin Zhangcff4d762020-07-29 16:37:51 -0400151 "ota_utils.py",
Tianjiea2076132020-08-19 17:25:32 -0700152 "target_files_diff.py",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700153 ],
154 libs: [
Tianjiea2076132020-08-19 17:25:32 -0700155 "ota_metadata_proto",
Yifan Hong9276cf02019-08-21 16:37:04 -0700156 "releasetools_check_target_files_vintf",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700157 "releasetools_common",
158 "releasetools_verity_utils",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000159 "apex_manifest",
Kelvin Zhang766eea72021-06-03 09:36:08 -0400160 "care_map_proto_py",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700161 ],
162 required: [
163 "brillo_update_payload",
Yifan Hong09298552019-09-04 11:49:01 -0700164 "checkvintf",
Yi-Yo Chiang36054e22022-01-08 22:29:30 +0800165 "generate_gki_certificate",
jiajia tangf3f842b2021-03-17 21:49:44 +0800166 "minigzip",
Yifan Hong125d0b62020-09-24 17:07:03 -0700167 "lz4",
168 "toybox",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000169 "unpack_bootimg",
170 "deapexer",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700171 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000172 target: {
173 darwin: {
174 // required module "brillo_update_payload" is disabled on darwin
175 enabled: false,
176 },
177 },
Tao Bao3c7b2a62019-08-07 12:24:20 -0700178}
179
180//
181// Host libraries.
182//
183
Tao Bao30e31142019-04-09 00:12:30 -0700184python_library_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700185 name: "releasetools_add_img_to_target_files",
186 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700187 "releasetools_add_img_to_target_files_defaults",
188 ],
189}
190
191python_library_host {
192 name: "releasetools_apex_utils",
Tao Bao005305a2019-08-05 13:00:44 -0700193 srcs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700194 "apex_utils.py",
195 ],
196 libs: [
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000197 "apex_manifest",
198 "ota_metadata_proto",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700199 "releasetools_common",
200 ],
201}
202
203python_library_host {
204 name: "releasetools_build_image",
205 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700206 "releasetools_build_image_defaults",
207 ],
208}
209
210python_library_host {
211 name: "releasetools_build_super_image",
212 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700213 "releasetools_build_super_image_defaults",
Tao Bao005305a2019-08-05 13:00:44 -0700214 ],
215}
216
217python_library_host {
Yifan Hongccb86fe2019-08-22 15:52:26 -0700218 name: "releasetools_check_target_files_vintf",
219 defaults: [
Yifan Hongccb86fe2019-08-22 15:52:26 -0700220 "releasetools_check_target_files_vintf_defaults",
221 ],
222}
223
224python_library_host {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700225 name: "releasetools_common",
Tao Bao30e31142019-04-09 00:12:30 -0700226 srcs: [
Tao Bao30e31142019-04-09 00:12:30 -0700227 "blockimgdiff.py",
Tao Bao30e31142019-04-09 00:12:30 -0700228 "common.py",
Tianjie Xu41976c72019-07-03 13:57:01 -0700229 "images.py",
Tao Bao30e31142019-04-09 00:12:30 -0700230 "rangelib.py",
Tao Bao30e31142019-04-09 00:12:30 -0700231 "sparse_img.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700232 ],
233 // Only the tools that are referenced directly are listed as required modules. For example,
234 // `avbtool` is not here, as the script always uses the one from info_dict['avb_avbtool'].
235 required: [
changho.shin0f125362019-07-08 10:59:00 +0900236 "aapt2",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700237 "boot_signer",
238 "brotli",
239 "bsdiff",
Yi-Yo Chiang36054e22022-01-08 22:29:30 +0800240 "generate_gki_certificate",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700241 "imgdiff",
242 "minigzip",
J. Avila98cd4cc2020-06-10 20:09:10 +0000243 "lz4",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700244 "mkbootfs",
Luca Stefani3e4b4482020-03-27 14:00:23 +0100245 "signapk",
Yifan Hong14a87122021-01-12 13:26:25 -0800246 "toybox",
247 "unpack_bootimg",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700248 ],
249}
250
251python_library_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700252 name: "releasetools_img_from_target_files",
253 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700254 "releasetools_img_from_target_files_defaults",
255 ],
256}
257
258python_library_host {
259 name: "releasetools_ota_from_target_files",
260 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700261 "releasetools_ota_from_target_files_defaults",
262 ],
263}
264
265python_library_host {
Inseob Kim9cda3972021-10-12 22:59:12 +0900266 name: "releasetools_fsverity_metadata_generator",
267 srcs: [
268 "fsverity_metadata_generator.py",
269 ],
Inseob Kimf69346e2021-10-13 15:16:33 +0900270 libs: [
271 "fsverity_digests_proto_python",
Inseob Kim9cda3972021-10-12 22:59:12 +0900272 ],
273}
274
275python_library_host {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700276 name: "releasetools_verity_utils",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700277 srcs: [
Tao Bao30e31142019-04-09 00:12:30 -0700278 "verity_utils.py",
279 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700280 required: [
281 "append2simg",
282 "build_verity_metadata",
283 "build_verity_tree",
284 "fec",
285 ],
286}
287
Tao Bao3c7b2a62019-08-07 12:24:20 -0700288//
289// Host binaries.
290//
291
Tao Bao2bbb07c2019-05-07 13:12:21 -0700292python_defaults {
293 name: "releasetools_binary_defaults",
294 version: {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700295 py3: {
Cole Faustc76931f2021-11-04 16:59:39 -0700296 embedded_launcher: true,
Tao Bao2bbb07c2019-05-07 13:12:21 -0700297 },
298 },
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900299 // TODO (b/140144201) Build imgdiff from releasetools_common
300 required: [
301 "aapt2",
302 "boot_signer",
303 "brotli",
304 "bsdiff",
Mohammad Samiul Islamf4909b42021-02-01 20:43:41 +0000305 "deapexer",
Yi-Yo Chiang36054e22022-01-08 22:29:30 +0800306 "generate_gki_certificate",
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900307 "imgdiff",
308 "minigzip",
Luca Stefanie0fc4ca2020-09-12 06:08:16 +0000309 "lz4",
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900310 "mkbootfs",
Luca Stefanie0fc4ca2020-09-12 06:08:16 +0000311 "signapk",
Yifan Hong14a87122021-01-12 13:26:25 -0800312 "toybox",
313 "unpack_bootimg",
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900314 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700315}
316
317python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700318 name: "add_img_to_target_files",
319 defaults: [
320 "releasetools_binary_defaults",
321 "releasetools_add_img_to_target_files_defaults",
322 ],
323}
324
325python_binary_host {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700326 name: "build_image",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700327 defaults: [
328 "releasetools_binary_defaults",
329 "releasetools_build_image_defaults",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700330 ],
331}
332
333python_binary_host {
334 name: "build_super_image",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700335 defaults: [
336 "releasetools_binary_defaults",
337 "releasetools_build_super_image_defaults",
338 ],
339}
340
341python_binary_host {
Yifan Hong3a7c2ef2019-11-01 18:23:19 +0000342 name: "check_partition_sizes",
343 srcs: [
344 "check_partition_sizes.py",
345 ],
346 libs: [
347 "releasetools_common",
348 ],
349 defaults: [
350 "releasetools_binary_defaults",
351 ],
352}
353
354python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700355 name: "check_ota_package_signature",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700356 defaults: ["releasetools_binary_defaults"],
357 srcs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700358 "check_ota_package_signature.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700359 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700360 libs: [
361 "releasetools_common",
362 ],
Tao Bao3c7b2a62019-08-07 12:24:20 -0700363 required: [
364 "delta_generator",
365 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000366 target: {
367 darwin: {
368 // required module "delta_generator" is disabled on darwin
369 enabled: false,
370 },
371 },
Tao Bao3c7b2a62019-08-07 12:24:20 -0700372}
373
374python_binary_host {
375 name: "check_target_files_signatures",
376 defaults: ["releasetools_binary_defaults"],
377 srcs: [
378 "check_target_files_signatures.py",
379 ],
380 libs: [
381 "releasetools_common",
382 ],
383 required: [
Elliott Hughes16a5cac2021-05-14 15:27:23 -0700384 "aapt2",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700385 ],
386}
387
388python_binary_host {
Yifan Honge3ba82c2019-08-21 13:29:30 -0700389 name: "check_target_files_vintf",
390 defaults: [
391 "releasetools_binary_defaults",
392 "releasetools_check_target_files_vintf_defaults"
393 ],
394}
395
396python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700397 name: "img_from_target_files",
398 defaults: [
399 "releasetools_binary_defaults",
400 "releasetools_img_from_target_files_defaults",
401 ],
Tao Bao30e31142019-04-09 00:12:30 -0700402}
403
Daniel Normanb8d52a22020-10-26 17:55:00 -0700404python_defaults {
405 name: "releasetools_find_shareduid_violation_defaults",
406 srcs: [
407 "find_shareduid_violation.py",
408 ],
409 libs: [
410 "releasetools_common",
411 ],
412}
413
414python_binary_host {
415 name: "find_shareduid_violation",
416 defaults: [
417 "releasetools_binary_defaults",
418 "releasetools_find_shareduid_violation_defaults",
419 ],
420}
421
422python_library_host {
423 name: "releasetools_find_shareduid_violation",
424 defaults: [
425 "releasetools_find_shareduid_violation_defaults",
Daniel Normanb8d52a22020-10-26 17:55:00 -0700426 ],
427}
428
Daniel Normanbfc51ef2019-07-24 14:34:54 -0700429python_binary_host {
Tao Baoe11a4602019-08-06 23:21:23 -0700430 name: "make_recovery_patch",
431 defaults: ["releasetools_binary_defaults"],
432 srcs: [
433 "make_recovery_patch.py",
434 ],
435 libs: [
436 "releasetools_common",
437 ],
438}
439
440python_binary_host {
Daniel Normanbfc51ef2019-07-24 14:34:54 -0700441 name: "merge_builds",
442 defaults: ["releasetools_binary_defaults"],
443 srcs: [
Daniel Normanbfc51ef2019-07-24 14:34:54 -0700444 "merge_builds.py",
445 ],
Daniel Normanbfc51ef2019-07-24 14:34:54 -0700446 libs: [
Tao Bao005305a2019-08-05 13:00:44 -0700447 "releasetools_build_super_image",
Daniel Normanbfc51ef2019-07-24 14:34:54 -0700448 "releasetools_common",
449 ],
450}
451
Tao Bao8821d642019-08-05 12:05:45 -0700452python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700453 name: "merge_target_files",
Tao Bao8821d642019-08-05 12:05:45 -0700454 defaults: ["releasetools_binary_defaults"],
455 srcs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700456 "merge_target_files.py",
Tao Bao8821d642019-08-05 12:05:45 -0700457 ],
458 libs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700459 "releasetools_add_img_to_target_files",
460 "releasetools_build_super_image",
Yifan Hongade0d3f2019-08-21 16:37:11 -0700461 "releasetools_check_target_files_vintf",
Tao Bao8821d642019-08-05 12:05:45 -0700462 "releasetools_common",
Daniel Normanb8d52a22020-10-26 17:55:00 -0700463 "releasetools_find_shareduid_violation",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700464 "releasetools_img_from_target_files",
465 "releasetools_ota_from_target_files",
Tao Bao8821d642019-08-05 12:05:45 -0700466 ],
Yifan Hong09298552019-09-04 11:49:01 -0700467 required: [
468 "checkvintf",
Daniel Norman21c34f72020-11-11 17:25:50 -0800469 "host_init_verifier",
Daniel Norman48603ff2021-02-22 15:15:24 -0800470 "secilc",
Yifan Hong09298552019-09-04 11:49:01 -0700471 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000472 target: {
473 darwin: {
474 // libs dep "releasetools_ota_from_target_files" is disabled on darwin
475 enabled: false,
476 },
477 },
Tao Bao3c7b2a62019-08-07 12:24:20 -0700478}
479
480python_binary_host {
481 name: "ota_from_target_files",
482 defaults: [
483 "releasetools_binary_defaults",
484 "releasetools_ota_from_target_files_defaults",
485 ],
486}
487
488python_binary_host {
489 name: "ota_package_parser",
490 defaults: ["releasetools_binary_defaults"],
491 srcs: [
492 "ota_package_parser.py",
493 "rangelib.py",
Tao Bao8821d642019-08-05 12:05:45 -0700494 ],
495}
496
Tao Baoe11a4602019-08-06 23:21:23 -0700497python_binary_host {
498 name: "sparse_img",
499 defaults: ["releasetools_binary_defaults"],
500 srcs: [
501 "rangelib.py",
502 "sparse_img.py",
503 ],
Tao Baoe11a4602019-08-06 23:21:23 -0700504}
505
Tao Bao3c7b2a62019-08-07 12:24:20 -0700506python_binary_host {
507 name: "sign_apex",
508 defaults: ["releasetools_binary_defaults"],
509 srcs: [
510 "sign_apex.py",
511 ],
512 libs: [
513 "releasetools_apex_utils",
514 "releasetools_common",
515 ],
516}
517
518python_binary_host {
519 name: "sign_target_files_apks",
520 defaults: ["releasetools_binary_defaults"],
521 srcs: [
522 "sign_target_files_apks.py",
523 ],
524 libs: [
525 "releasetools_add_img_to_target_files",
526 "releasetools_apex_utils",
527 "releasetools_common",
528 ],
529}
530
531python_binary_host {
532 name: "validate_target_files",
533 defaults: ["releasetools_binary_defaults"],
534 srcs: [
535 "validate_target_files.py",
536 ],
537 libs: [
538 "releasetools_common",
539 ],
540}
541
Jiyong Parkb92b8f42021-03-15 23:13:42 +0900542python_binary_host {
543 name: "verity_utils",
544 defaults: ["releasetools_binary_defaults"],
545 srcs: [
546 "verity_utils.py",
547 ],
548 libs: [
549 "releasetools_common",
550 ],
551 required: [
552 "append2simg",
553 "build_verity_metadata",
554 "build_verity_tree",
555 "fec",
556 ],
557}
558
Inseob Kim2d034932021-12-13 14:04:00 +0900559python_binary_host {
Inseob Kim135c1f12022-01-06 17:22:07 +0900560 name: "fsverity_manifest_generator",
Inseob Kim2d034932021-12-13 14:04:00 +0900561 srcs: [
Inseob Kim135c1f12022-01-06 17:22:07 +0900562 "fsverity_manifest_generator.py",
Inseob Kim2d034932021-12-13 14:04:00 +0900563 ],
564 libs: [
565 "fsverity_digests_proto_python",
Inseob Kim135c1f12022-01-06 17:22:07 +0900566 "releasetools_common",
567 ],
568 required: [
569 "aapt2",
570 "apksigner",
571 "fsverity",
572 ],
573}
574
575python_binary_host {
576 name: "fsverity_metadata_generator",
577 srcs: [
578 "fsverity_metadata_generator.py",
Inseob Kim2d034932021-12-13 14:04:00 +0900579 ],
580 required: [
581 "fsverity",
582 ],
583}
584
Tao Bao3c7b2a62019-08-07 12:24:20 -0700585//
586// Tests.
587//
588
Tao Baoca82fc92019-05-01 21:58:03 -0700589python_defaults {
590 name: "releasetools_test_defaults",
Tao Bao30e31142019-04-09 00:12:30 -0700591 srcs: [
Tao Bao2bbb07c2019-05-07 13:12:21 -0700592 "check_ota_package_signature.py",
Yifan Hong3a7c2ef2019-11-01 18:23:19 +0000593 "check_partition_sizes.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700594 "check_target_files_signatures.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700595 "make_recovery_patch.py",
596 "merge_target_files.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700597 "ota_package_parser.py",
598 "sign_apex.py",
599 "sign_target_files_apks.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700600 "validate_target_files.py",
601
Tao Bao30e31142019-04-09 00:12:30 -0700602 "test_*.py",
603 ],
604 libs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700605 "releasetools_add_img_to_target_files",
606 "releasetools_apex_utils",
607 "releasetools_build_image",
Tao Bao005305a2019-08-05 13:00:44 -0700608 "releasetools_build_super_image",
Yifan Hongccb86fe2019-08-22 15:52:26 -0700609 "releasetools_check_target_files_vintf",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700610 "releasetools_common",
Daniel Normanb8d52a22020-10-26 17:55:00 -0700611 "releasetools_find_shareduid_violation",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700612 "releasetools_img_from_target_files",
613 "releasetools_ota_from_target_files",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700614 "releasetools_verity_utils",
Tao Bao30e31142019-04-09 00:12:30 -0700615 ],
616 data: [
Yifan Hongccb86fe2019-08-22 15:52:26 -0700617 "testdata/**/*",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000618 ":com.android.apex.compressed.v1",
619 ":com.android.apex.compressed.v1_original",
Tao Bao30e31142019-04-09 00:12:30 -0700620 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000621 target: {
622 darwin: {
623 // libs dep "releasetools_ota_from_target_files" is disabled on darwin
624 enabled: false,
625 },
626 },
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000627 required: [
628 "deapexer",
629 ],
Tao Baoca82fc92019-05-01 21:58:03 -0700630}
631
632python_test_host {
633 name: "releasetools_test",
634 defaults: ["releasetools_test_defaults"],
635 main: "test_utils.py",
Cole Faustc76931f2021-11-04 16:59:39 -0700636 // Don't use embedded_launcher, atest will try (but may fail) to load libc++.so from
637 // host, because the test executable won't be able to find the needed libs via its
638 // runpath.
Julien Desprez6d9e78f2020-12-21 13:56:05 -0800639 test_options: {
640 unit_test: true,
641 },
Tao Bao30e31142019-04-09 00:12:30 -0700642}