blob: c785c8eda4a9498361dd3e49f89da0ee761e2be4 [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",
Kelvin Zhang1caead02022-09-23 10:06:03 -070040 "libavbtool",
Tao Bao3c7b2a62019-08-07 12:24:20 -070041 ],
42 required: [
43 "care_map_generator",
44 ],
45}
46
47python_defaults {
48 name: "releasetools_build_image_defaults",
49 srcs: [
50 "build_image.py",
51 ],
52 libs: [
53 "releasetools_common",
Inseob Kim9cda3972021-10-12 22:59:12 +090054 "releasetools_fsverity_metadata_generator",
Tao Bao3c7b2a62019-08-07 12:24:20 -070055 "releasetools_verity_utils",
56 ],
57 required: [
58 "blk_alloc_to_base_fs",
59 "e2fsck",
David Anderson94ad5bb2022-03-04 10:57:58 -080060 "fsck.erofs",
61 "img2simg",
62 "mkfs.erofs",
Yifan Hong77023452020-08-25 16:15:16 -070063 "mkuserimg_mke2fs",
Tao Bao3c7b2a62019-08-07 12:24:20 -070064 "simg2img",
65 "tune2fs",
Cole Faustb0002082022-09-05 18:34:56 -070066 "mkf2fsuserimg",
Jaegeuk Kim1f50a362021-06-08 18:24:46 -070067 "fsck.f2fs",
Tao Bao3c7b2a62019-08-07 12:24:20 -070068 ],
69}
70
71python_defaults {
72 name: "releasetools_build_super_image_defaults",
73 srcs: [
74 "build_super_image.py",
75 ],
76 libs: [
77 "releasetools_common",
78 ],
79}
80
81python_defaults {
82 name: "releasetools_img_from_target_files_defaults",
83 srcs: [
84 "img_from_target_files.py",
85 ],
86 libs: [
87 "releasetools_build_super_image",
88 "releasetools_common",
89 ],
90}
91
92python_defaults {
Yifan Honge3ba82c2019-08-21 13:29:30 -070093 name: "releasetools_check_target_files_vintf_defaults",
94 srcs: [
95 "check_target_files_vintf.py",
96 ],
97 libs: [
Jooyung Haneb118212022-10-17 18:07:28 +090098 "apex_manifest",
Yifan Honge3ba82c2019-08-21 13:29:30 -070099 "releasetools_common",
100 ],
101 required: [
Jooyung Hanc9542ab2023-06-27 16:12:32 +0900102 "apexd_host",
Yifan Honge3ba82c2019-08-21 13:29:30 -0700103 "checkvintf",
104 ],
105}
106
Tianjiea2076132020-08-19 17:25:32 -0700107python_library_host {
108 name: "ota_metadata_proto",
Tianjiea2076132020-08-19 17:25:32 -0700109 srcs: [
110 "ota_metadata.proto",
111 ],
112 proto: {
113 canonical_path_from_root: false,
114 },
115}
116
Kelvin Zhanga3a74b62021-05-14 17:18:43 -0400117cc_library_static {
118 name: "ota_metadata_proto_cc",
119 srcs: [
120 "ota_metadata.proto",
121 ],
122 host_supported: true,
123 recovery_available: true,
124 proto: {
125 canonical_path_from_root: false,
126 type: "lite",
127 export_proto_headers: true,
128 },
129}
130
Kelvin Zhang2b6a9c32021-04-12 17:24:26 -0400131java_library_static {
132 name: "ota_metadata_proto_java",
133 host_supported: true,
134 proto: {
135 type: "nano",
136 },
137 srcs: ["ota_metadata.proto"],
138 sdk_version: "9",
139 target: {
140 android: {
141 jarjar_rules: "jarjar-rules.txt",
142 },
143 host: {
144 static_libs: ["libprotobuf-java-nano"],
145 },
146 },
147 visibility: ["//frameworks/base:__subpackages__"]
148}
149
Yifan Honge3ba82c2019-08-21 13:29:30 -0700150python_defaults {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700151 name: "releasetools_ota_from_target_files_defaults",
152 srcs: [
153 "edify_generator.py",
Kelvin Zhangcff4d762020-07-29 16:37:51 -0400154 "non_ab_ota.py",
Tianjiea2076132020-08-19 17:25:32 -0700155 "ota_from_target_files.py",
Tianjiea2076132020-08-19 17:25:32 -0700156 "target_files_diff.py",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700157 ],
158 libs: [
Tianjiea2076132020-08-19 17:25:32 -0700159 "ota_metadata_proto",
Yifan Hong9276cf02019-08-21 16:37:04 -0700160 "releasetools_check_target_files_vintf",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700161 "releasetools_common",
162 "releasetools_verity_utils",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000163 "apex_manifest",
Kelvin Zhang766eea72021-06-03 09:36:08 -0400164 "care_map_proto_py",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700165 "ota_utils_lib",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700166 ],
167 required: [
168 "brillo_update_payload",
Yifan Hong09298552019-09-04 11:49:01 -0700169 "checkvintf",
Yi-Yo Chiang36054e22022-01-08 22:29:30 +0800170 "generate_gki_certificate",
Yifan Hong125d0b62020-09-24 17:07:03 -0700171 "lz4",
172 "toybox",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000173 "unpack_bootimg",
174 "deapexer",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700175 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000176 target: {
177 darwin: {
178 // required module "brillo_update_payload" is disabled on darwin
179 enabled: false,
180 },
181 },
Tao Bao3c7b2a62019-08-07 12:24:20 -0700182}
183
184//
185// Host libraries.
186//
187
Tao Bao30e31142019-04-09 00:12:30 -0700188python_library_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700189 name: "releasetools_add_img_to_target_files",
190 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700191 "releasetools_add_img_to_target_files_defaults",
192 ],
193}
194
195python_library_host {
196 name: "releasetools_apex_utils",
Tao Bao005305a2019-08-05 13:00:44 -0700197 srcs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700198 "apex_utils.py",
199 ],
200 libs: [
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000201 "apex_manifest",
202 "ota_metadata_proto",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700203 "releasetools_common",
204 ],
205}
206
207python_library_host {
208 name: "releasetools_build_image",
209 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700210 "releasetools_build_image_defaults",
211 ],
212}
213
214python_library_host {
215 name: "releasetools_build_super_image",
216 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700217 "releasetools_build_super_image_defaults",
Tao Bao005305a2019-08-05 13:00:44 -0700218 ],
219}
220
221python_library_host {
Yifan Hongccb86fe2019-08-22 15:52:26 -0700222 name: "releasetools_check_target_files_vintf",
223 defaults: [
Yifan Hongccb86fe2019-08-22 15:52:26 -0700224 "releasetools_check_target_files_vintf_defaults",
225 ],
226}
227
228python_library_host {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700229 name: "releasetools_common",
Tao Bao30e31142019-04-09 00:12:30 -0700230 srcs: [
Tao Bao30e31142019-04-09 00:12:30 -0700231 "blockimgdiff.py",
Tao Bao30e31142019-04-09 00:12:30 -0700232 "common.py",
Tianjie Xu41976c72019-07-03 13:57:01 -0700233 "images.py",
Tao Bao30e31142019-04-09 00:12:30 -0700234 "rangelib.py",
Tao Bao30e31142019-04-09 00:12:30 -0700235 "sparse_img.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700236 ],
237 // Only the tools that are referenced directly are listed as required modules. For example,
238 // `avbtool` is not here, as the script always uses the one from info_dict['avb_avbtool'].
239 required: [
changho.shin0f125362019-07-08 10:59:00 +0900240 "aapt2",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700241 "boot_signer",
242 "brotli",
243 "bsdiff",
Yi-Yo Chiang36054e22022-01-08 22:29:30 +0800244 "generate_gki_certificate",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700245 "imgdiff",
J. Avila98cd4cc2020-06-10 20:09:10 +0000246 "lz4",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700247 "mkbootfs",
Luca Stefani3e4b4482020-03-27 14:00:23 +0100248 "signapk",
Yifan Hong14a87122021-01-12 13:26:25 -0800249 "toybox",
250 "unpack_bootimg",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700251 ],
252}
253
254python_library_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700255 name: "releasetools_img_from_target_files",
256 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700257 "releasetools_img_from_target_files_defaults",
258 ],
259}
260
261python_library_host {
262 name: "releasetools_ota_from_target_files",
263 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700264 "releasetools_ota_from_target_files_defaults",
265 ],
266}
267
268python_library_host {
Inseob Kim9cda3972021-10-12 22:59:12 +0900269 name: "releasetools_fsverity_metadata_generator",
270 srcs: [
271 "fsverity_metadata_generator.py",
272 ],
Inseob Kimf69346e2021-10-13 15:16:33 +0900273 libs: [
274 "fsverity_digests_proto_python",
Inseob Kim9cda3972021-10-12 22:59:12 +0900275 ],
276}
277
278python_library_host {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700279 name: "releasetools_verity_utils",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700280 srcs: [
Tao Bao30e31142019-04-09 00:12:30 -0700281 "verity_utils.py",
282 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700283 required: [
284 "append2simg",
285 "build_verity_metadata",
286 "build_verity_tree",
287 "fec",
288 ],
289}
290
Tao Bao3c7b2a62019-08-07 12:24:20 -0700291//
292// Host binaries.
293//
294
Tao Bao2bbb07c2019-05-07 13:12:21 -0700295python_defaults {
296 name: "releasetools_binary_defaults",
297 version: {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700298 py3: {
Cole Faustc76931f2021-11-04 16:59:39 -0700299 embedded_launcher: true,
Tao Bao2bbb07c2019-05-07 13:12:21 -0700300 },
301 },
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900302 // TODO (b/140144201) Build imgdiff from releasetools_common
303 required: [
304 "aapt2",
305 "boot_signer",
306 "brotli",
307 "bsdiff",
Mohammad Samiul Islamf4909b42021-02-01 20:43:41 +0000308 "deapexer",
Yi-Yo Chiang36054e22022-01-08 22:29:30 +0800309 "generate_gki_certificate",
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900310 "imgdiff",
Luca Stefanie0fc4ca2020-09-12 06:08:16 +0000311 "lz4",
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900312 "mkbootfs",
Luca Stefanie0fc4ca2020-09-12 06:08:16 +0000313 "signapk",
Yifan Hong14a87122021-01-12 13:26:25 -0800314 "toybox",
315 "unpack_bootimg",
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900316 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700317}
318
319python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700320 name: "add_img_to_target_files",
321 defaults: [
322 "releasetools_binary_defaults",
323 "releasetools_add_img_to_target_files_defaults",
324 ],
325}
326
Kelvin Zhang197772f2022-04-26 15:15:11 -0700327python_library_host {
328 name: "ota_utils_lib",
329 srcs: [
330 "ota_utils.py",
331 "payload_signer.py",
332 ],
Kelvin Zhangf91d74b2023-03-14 16:46:22 -0700333 libs: [
334 "releasetools_common",
335 ],
Kelvin Zhang197772f2022-04-26 15:15:11 -0700336}
337
338python_binary_host {
339 name: "merge_ota",
340 version: {
341 py3: {
342 embedded_launcher: true,
343 },
344 },
345 srcs: [
346 "merge_ota.py",
Kelvin Zhangc7441e52023-08-22 08:56:30 -0700347 "ota_signing_utils.py",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700348 ],
349 libs: [
350 "ota_metadata_proto",
351 "update_payload",
352 "care_map_proto_py",
353 "releasetools_common",
354 "ota_utils_lib",
355 ],
356}
357
Tao Bao3c7b2a62019-08-07 12:24:20 -0700358python_binary_host {
Kelvin Zhangf91d74b2023-03-14 16:46:22 -0700359 name: "create_brick_ota",
360 version: {
361 py3: {
362 embedded_launcher: true,
363 },
364 },
365 srcs: [
366 "create_brick_ota.py",
367 ],
368 libs: [
369 "ota_utils_lib",
370 ],
371}
372
373python_binary_host {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700374 name: "build_image",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700375 defaults: [
376 "releasetools_binary_defaults",
377 "releasetools_build_image_defaults",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700378 ],
379}
380
381python_binary_host {
382 name: "build_super_image",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700383 defaults: [
384 "releasetools_binary_defaults",
385 "releasetools_build_super_image_defaults",
386 ],
387}
388
389python_binary_host {
Yifan Hong3a7c2ef2019-11-01 18:23:19 +0000390 name: "check_partition_sizes",
391 srcs: [
392 "check_partition_sizes.py",
393 ],
394 libs: [
395 "releasetools_common",
396 ],
397 defaults: [
398 "releasetools_binary_defaults",
399 ],
400}
401
402python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700403 name: "check_ota_package_signature",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700404 defaults: ["releasetools_binary_defaults"],
405 srcs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700406 "check_ota_package_signature.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700407 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700408 libs: [
409 "releasetools_common",
410 ],
Tao Bao3c7b2a62019-08-07 12:24:20 -0700411 required: [
412 "delta_generator",
413 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000414 target: {
415 darwin: {
416 // required module "delta_generator" is disabled on darwin
417 enabled: false,
418 },
419 },
Tao Bao3c7b2a62019-08-07 12:24:20 -0700420}
421
422python_binary_host {
423 name: "check_target_files_signatures",
424 defaults: ["releasetools_binary_defaults"],
425 srcs: [
426 "check_target_files_signatures.py",
427 ],
428 libs: [
429 "releasetools_common",
430 ],
431 required: [
Elliott Hughes16a5cac2021-05-14 15:27:23 -0700432 "aapt2",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700433 ],
434}
435
436python_binary_host {
Yifan Honge3ba82c2019-08-21 13:29:30 -0700437 name: "check_target_files_vintf",
438 defaults: [
439 "releasetools_binary_defaults",
440 "releasetools_check_target_files_vintf_defaults"
441 ],
442}
443
444python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700445 name: "img_from_target_files",
446 defaults: [
447 "releasetools_binary_defaults",
448 "releasetools_img_from_target_files_defaults",
449 ],
Tao Bao30e31142019-04-09 00:12:30 -0700450}
451
Daniel Normanb8d52a22020-10-26 17:55:00 -0700452python_defaults {
453 name: "releasetools_find_shareduid_violation_defaults",
454 srcs: [
455 "find_shareduid_violation.py",
456 ],
457 libs: [
458 "releasetools_common",
459 ],
460}
461
462python_binary_host {
463 name: "find_shareduid_violation",
464 defaults: [
465 "releasetools_binary_defaults",
466 "releasetools_find_shareduid_violation_defaults",
467 ],
468}
469
470python_library_host {
471 name: "releasetools_find_shareduid_violation",
472 defaults: [
473 "releasetools_find_shareduid_violation_defaults",
Daniel Normanb8d52a22020-10-26 17:55:00 -0700474 ],
475}
476
Daniel Normanbfc51ef2019-07-24 14:34:54 -0700477python_binary_host {
Tao Baoe11a4602019-08-06 23:21:23 -0700478 name: "make_recovery_patch",
479 defaults: ["releasetools_binary_defaults"],
480 srcs: [
481 "make_recovery_patch.py",
482 ],
483 libs: [
484 "releasetools_common",
485 ],
486}
487
488python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700489 name: "ota_from_target_files",
490 defaults: [
491 "releasetools_binary_defaults",
492 "releasetools_ota_from_target_files_defaults",
493 ],
494}
495
496python_binary_host {
Kelvin Zhangc7441e52023-08-22 08:56:30 -0700497 name: "ota_from_raw_img",
498 srcs: [
499 "ota_from_raw_img.py",
500 "ota_signing_utils.py",
501 ],
502 main: "ota_from_raw_img.py",
503 defaults: [
504 "releasetools_binary_defaults",
505 ],
506 required: [
507 "delta_generator",
508 ],
509 libs: [
510 "ota_metadata_proto",
511 "releasetools_common",
512 "ota_utils_lib",
513 ],
514}
515
516python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700517 name: "ota_package_parser",
518 defaults: ["releasetools_binary_defaults"],
519 srcs: [
520 "ota_package_parser.py",
521 "rangelib.py",
Tao Bao8821d642019-08-05 12:05:45 -0700522 ],
523}
524
Tao Baoe11a4602019-08-06 23:21:23 -0700525python_binary_host {
526 name: "sparse_img",
527 defaults: ["releasetools_binary_defaults"],
528 srcs: [
529 "rangelib.py",
530 "sparse_img.py",
531 ],
Tao Baoe11a4602019-08-06 23:21:23 -0700532}
533
Tao Bao3c7b2a62019-08-07 12:24:20 -0700534python_binary_host {
535 name: "sign_apex",
536 defaults: ["releasetools_binary_defaults"],
537 srcs: [
538 "sign_apex.py",
539 ],
540 libs: [
541 "releasetools_apex_utils",
542 "releasetools_common",
543 ],
544}
545
546python_binary_host {
547 name: "sign_target_files_apks",
548 defaults: ["releasetools_binary_defaults"],
549 srcs: [
550 "sign_target_files_apks.py",
551 ],
552 libs: [
553 "releasetools_add_img_to_target_files",
554 "releasetools_apex_utils",
555 "releasetools_common",
556 ],
557}
558
559python_binary_host {
560 name: "validate_target_files",
561 defaults: ["releasetools_binary_defaults"],
562 srcs: [
563 "validate_target_files.py",
564 ],
565 libs: [
566 "releasetools_common",
567 ],
568}
569
Jiyong Parkb92b8f42021-03-15 23:13:42 +0900570python_binary_host {
571 name: "verity_utils",
572 defaults: ["releasetools_binary_defaults"],
573 srcs: [
574 "verity_utils.py",
575 ],
576 libs: [
577 "releasetools_common",
578 ],
579 required: [
580 "append2simg",
581 "build_verity_metadata",
582 "build_verity_tree",
583 "fec",
584 ],
585}
586
Inseob Kim2d034932021-12-13 14:04:00 +0900587python_binary_host {
Inseob Kim135c1f12022-01-06 17:22:07 +0900588 name: "fsverity_metadata_generator",
Inseob Kim293112d2022-02-16 11:22:03 +0900589 defaults: ["releasetools_binary_defaults"],
Inseob Kim135c1f12022-01-06 17:22:07 +0900590 srcs: [
591 "fsverity_metadata_generator.py",
Inseob Kim2d034932021-12-13 14:04:00 +0900592 ],
593 required: [
594 "fsverity",
595 ],
596}
597
Tao Bao3c7b2a62019-08-07 12:24:20 -0700598//
599// Tests.
600//
601
Tao Baoca82fc92019-05-01 21:58:03 -0700602python_defaults {
603 name: "releasetools_test_defaults",
Tao Bao30e31142019-04-09 00:12:30 -0700604 srcs: [
Tao Bao2bbb07c2019-05-07 13:12:21 -0700605 "check_ota_package_signature.py",
Yifan Hong3a7c2ef2019-11-01 18:23:19 +0000606 "check_partition_sizes.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700607 "check_target_files_signatures.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700608 "make_recovery_patch.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700609 "ota_package_parser.py",
610 "sign_apex.py",
611 "sign_target_files_apks.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700612 "validate_target_files.py",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700613 "merge_ota.py",
Kelvin Zhangc7441e52023-08-22 08:56:30 -0700614 "ota_signing_utils.py",
Daniel Norman2b0b9ca2022-03-02 16:12:08 -0800615 ":releasetools_merge_sources",
616 ":releasetools_merge_tests",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700617
Tao Bao30e31142019-04-09 00:12:30 -0700618 "test_*.py",
619 ],
620 libs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700621 "releasetools_add_img_to_target_files",
622 "releasetools_apex_utils",
623 "releasetools_build_image",
Tao Bao005305a2019-08-05 13:00:44 -0700624 "releasetools_build_super_image",
Yifan Hongccb86fe2019-08-22 15:52:26 -0700625 "releasetools_check_target_files_vintf",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700626 "releasetools_common",
Daniel Normanb8d52a22020-10-26 17:55:00 -0700627 "releasetools_find_shareduid_violation",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700628 "releasetools_img_from_target_files",
629 "releasetools_ota_from_target_files",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700630 "releasetools_verity_utils",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700631 "update_payload",
Tao Bao30e31142019-04-09 00:12:30 -0700632 ],
633 data: [
Yifan Hongccb86fe2019-08-22 15:52:26 -0700634 "testdata/**/*",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000635 ":com.android.apex.compressed.v1",
636 ":com.android.apex.compressed.v1_original",
Rob Seymour9492da52022-10-06 18:23:49 +0000637 ":com.android.apex.vendor.foo.with_vintf"
Tao Bao30e31142019-04-09 00:12:30 -0700638 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000639 target: {
640 darwin: {
641 // libs dep "releasetools_ota_from_target_files" is disabled on darwin
642 enabled: false,
643 },
644 },
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000645 required: [
646 "deapexer",
647 ],
Tao Baoca82fc92019-05-01 21:58:03 -0700648}
649
650python_test_host {
651 name: "releasetools_test",
652 defaults: ["releasetools_test_defaults"],
653 main: "test_utils.py",
Cole Faustc76931f2021-11-04 16:59:39 -0700654 // Don't use embedded_launcher, atest will try (but may fail) to load libc++.so from
655 // host, because the test executable won't be able to find the needed libs via its
656 // runpath.
Julien Desprez6d9e78f2020-12-21 13:56:05 -0800657 test_options: {
658 unit_test: true,
659 },
Tao Bao30e31142019-04-09 00:12:30 -0700660}