blob: 3f2ea445fc039b6a14d703bba2400959800475bc [file] [log] [blame]
Keigo Oka0ede7bd2019-05-13 17:35:13 +09001#
2# Copyright (C) 2019 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
Amin Hassani165d4b42019-06-27 11:04:14 -070017# Stop linter from complaining XXX_unittest.cc naming.
18# gnlint: disable=GnLintSourceFileNames
19
Keigo Oka0ede7bd2019-05-13 17:35:13 +090020import("//common-mk/generate-dbus-adaptors.gni")
21import("//common-mk/generate-dbus-proxies.gni")
22import("//common-mk/openssl_pem.gni")
23import("//common-mk/pkg_config.gni")
24import("//common-mk/proto_library.gni")
25import("//update_engine/tar_bunzip2.gni")
26
27group("all") {
28 deps = [
29 ":delta_generator",
30 ":libpayload_consumer",
31 ":libpayload_generator",
32 ":libupdate_engine",
33 ":libupdate_engine_client",
34 ":update_engine",
35 ":update_engine-dbus-adaptor",
36 ":update_engine-dbus-kiosk-app-client",
37 ":update_engine_client",
38 ":update_metadata-protos",
39 ]
40
41 if (use.test) {
42 deps += [
43 ":test_http_server",
44 ":test_subprocess",
45 ":update_engine-test_images",
46 ":update_engine-testkeys",
47 ":update_engine_test_libs",
48 ":update_engine_unittests",
49 ]
50 }
51
52 if (use.fuzzer) {
Amin Hassani6f0366d2019-10-14 14:56:43 -070053 deps += [
54 ":update_engine_delta_performer_fuzzer",
55 ":update_engine_omaha_request_action_fuzzer",
56 ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +090057 }
58}
59
60pkg_config("target_defaults") {
61 cflags_cc = [
62 "-fno-strict-aliasing",
63 "-Wnon-virtual-dtor",
64 ]
65 cflags = [
66 "-g",
67 "-ffunction-sections",
68 "-Wall",
69 "-Wextra",
70 "-Werror",
71 "-Wno-unused-parameter",
72 ]
73 ldflags = [ "-Wl,--gc-sections" ]
74 defines = [
75 "__CHROMEOS__",
76 "_FILE_OFFSET_BITS=64",
77 "_POSIX_C_SOURCE=199309L",
Keigo Oka0ede7bd2019-05-13 17:35:13 +090078 "USE_DBUS=${use.dbus}",
79 "USE_FEC=0",
80 "USE_HWID_OVERRIDE=${use.hwid_override}",
81 "USE_CHROME_KIOSK_APP=${use.chrome_kiosk_app}",
82 "USE_CHROME_NETWORK_PROXY=${use.chrome_network_proxy}",
Keigo Oka0ede7bd2019-05-13 17:35:13 +090083 "USE_SHILL=1",
84 ]
85 include_dirs = [
86 # We need this include dir because we include all the local code as
87 # "update_engine/...".
88 "${platform2_root}",
89 "${platform2_root}/update_engine/client_library/include",
90 ]
Clark Chunge6b888c2020-04-20 15:50:37 +080091
92 # NOSORT
Keigo Oka0ede7bd2019-05-13 17:35:13 +090093 pkg_deps = [
Grace Chamb6d1b412019-10-31 14:53:42 +090094 "libbrillo",
Keigo Oka0ede7bd2019-05-13 17:35:13 +090095 "libchrome-${libbase_ver}",
96
97 # system_api depends on protobuf (or protobuf-lite). It must appear
98 # before protobuf here or the linker flags won't be in the right
99 # order.
100 "system_api",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900101 ]
Allen Webb816193f2019-10-25 10:06:46 -0700102 if (use.fuzzer) {
103 pkg_deps += [ "protobuf" ]
104 } else {
105 pkg_deps += [ "protobuf-lite" ]
106 }
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900107}
108
109# Protobufs.
110proto_library("update_metadata-protos") {
111 proto_in_dir = "."
112 proto_out_dir = "include/update_engine"
Clark Chunge6b888c2020-04-20 15:50:37 +0800113 sources = [ "update_metadata.proto" ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900114}
115
116# Chrome D-Bus bindings.
117generate_dbus_adaptors("update_engine-dbus-adaptor") {
118 dbus_adaptors_out_dir = "include/dbus_bindings"
Clark Chunge6b888c2020-04-20 15:50:37 +0800119 sources = [ "dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml" ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900120}
121
122generate_dbus_proxies("update_engine-dbus-kiosk-app-client") {
123 mock_output_file = "include/kiosk-app/dbus-proxy-mocks.h"
124 proxy_output_file = "include/kiosk-app/dbus-proxies.h"
Clark Chunge6b888c2020-04-20 15:50:37 +0800125 sources = [ "dbus_bindings/org.chromium.KioskAppService.dbus-xml" ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900126}
127
128# The payload application component and common dependencies.
129static_library("libpayload_consumer") {
130 sources = [
131 "common/action_processor.cc",
132 "common/boot_control_stub.cc",
133 "common/clock.cc",
134 "common/constants.cc",
135 "common/cpu_limiter.cc",
136 "common/error_code_utils.cc",
137 "common/hash_calculator.cc",
138 "common/http_common.cc",
139 "common/http_fetcher.cc",
140 "common/hwid_override.cc",
141 "common/multi_range_http_fetcher.cc",
142 "common/platform_constants_chromeos.cc",
143 "common/prefs.cc",
144 "common/proxy_resolver.cc",
145 "common/subprocess.cc",
146 "common/terminator.cc",
147 "common/utils.cc",
148 "payload_consumer/bzip_extent_writer.cc",
149 "payload_consumer/cached_file_descriptor.cc",
150 "payload_consumer/delta_performer.cc",
151 "payload_consumer/download_action.cc",
152 "payload_consumer/extent_reader.cc",
153 "payload_consumer/extent_writer.cc",
154 "payload_consumer/file_descriptor.cc",
155 "payload_consumer/file_descriptor_utils.cc",
156 "payload_consumer/file_writer.cc",
157 "payload_consumer/filesystem_verifier_action.cc",
158 "payload_consumer/install_plan.cc",
159 "payload_consumer/mount_history.cc",
160 "payload_consumer/payload_constants.cc",
161 "payload_consumer/payload_metadata.cc",
162 "payload_consumer/payload_verifier.cc",
163 "payload_consumer/postinstall_runner_action.cc",
164 "payload_consumer/verity_writer_stub.cc",
165 "payload_consumer/xz_extent_writer.cc",
166 ]
167 configs += [ ":target_defaults" ]
168 libs = [
169 "bz2",
170 "rt",
171 ]
172
173 # TODO(deymo): Remove unused dependencies once we stop including files
174 # from the root directory.
175 all_dependent_pkg_deps = [
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900176 "libbspatch",
Clark Chunge6b888c2020-04-20 15:50:37 +0800177 "libcrypto",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900178 "libpuffpatch",
Clark Chunge6b888c2020-04-20 15:50:37 +0800179 "xz-embedded",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900180 ]
Clark Chunge6b888c2020-04-20 15:50:37 +0800181 deps = [ ":update_metadata-protos" ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900182}
183
184# The main daemon static_library with all the code used to check for updates
185# with Omaha and expose a DBus daemon.
186static_library("libupdate_engine") {
187 sources = [
188 "boot_control_chromeos.cc",
189 "certificate_checker.cc",
190 "common_service.cc",
191 "connection_manager.cc",
192 "connection_utils.cc",
Amin Hassani565331e2019-06-24 14:11:29 -0700193 "daemon_chromeos.cc",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900194 "dbus_connection.cc",
195 "dbus_service.cc",
196 "hardware_chromeos.cc",
197 "image_properties_chromeos.cc",
198 "libcurl_http_fetcher.cc",
199 "metrics_reporter_omaha.cc",
200 "metrics_utils.cc",
201 "omaha_request_action.cc",
202 "omaha_request_builder_xml.cc",
203 "omaha_request_params.cc",
204 "omaha_response_handler_action.cc",
205 "omaha_utils.cc",
206 "p2p_manager.cc",
207 "payload_state.cc",
208 "power_manager_chromeos.cc",
209 "real_system_state.cc",
210 "shill_proxy.cc",
211 "update_attempter.cc",
212 "update_boot_flags_action.cc",
213 "update_manager/boxed_value.cc",
214 "update_manager/chromeos_policy.cc",
215 "update_manager/default_policy.cc",
216 "update_manager/enough_slots_ab_updates_policy_impl.cc",
217 "update_manager/enterprise_device_policy_impl.cc",
218 "update_manager/evaluation_context.cc",
219 "update_manager/interactive_update_policy_impl.cc",
220 "update_manager/next_update_check_policy_impl.cc",
221 "update_manager/official_build_check_policy_impl.cc",
222 "update_manager/out_of_box_experience_policy_impl.cc",
223 "update_manager/policy.cc",
224 "update_manager/policy_test_utils.cc",
225 "update_manager/real_config_provider.cc",
226 "update_manager/real_device_policy_provider.cc",
227 "update_manager/real_random_provider.cc",
228 "update_manager/real_shill_provider.cc",
229 "update_manager/real_system_provider.cc",
230 "update_manager/real_time_provider.cc",
231 "update_manager/real_updater_provider.cc",
232 "update_manager/staging_utils.cc",
233 "update_manager/state_factory.cc",
234 "update_manager/update_manager.cc",
235 "update_manager/update_time_restrictions_policy_impl.cc",
236 "update_manager/weekly_time.cc",
237 "update_status_utils.cc",
238 ]
239 configs += [ ":target_defaults" ]
240 libs = [
241 "bz2",
Grace Chamb6d1b412019-10-31 14:53:42 +0900242 "policy",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900243 "rootdev",
244 "rt",
245 ]
246 all_dependent_pkg_deps = [
247 "dbus-1",
248 "expat",
249 "libcurl",
250 "libdebugd-client",
251 "libmetrics-${libbase_ver}",
252 "libpower_manager-client",
253 "libsession_manager-client",
254 "libshill-client",
255 "libssl",
256 "libupdate_engine-client",
257 "vboot_host",
258 ]
259 deps = [
260 ":libpayload_consumer",
261 ":update_engine-dbus-adaptor",
262 ":update_metadata-protos",
263 ]
264
265 if (use.dlc) {
266 all_dependent_pkg_deps += [ "libdlcservice-client" ]
267 }
268
269 if (use.chrome_network_proxy) {
270 sources += [ "chrome_browser_proxy_resolver.cc" ]
271 }
272
273 if (use.chrome_kiosk_app) {
274 deps += [ ":update_engine-dbus-kiosk-app-client" ]
275 }
276
277 if (use.dlc) {
Jae Hoon Kim38de3b12020-04-29 19:41:23 -0700278 sources += [
279 "dlcservice_chromeos.cc",
280 "excluder_chromeos.cc",
281 ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900282 } else {
Jae Hoon Kim38de3b12020-04-29 19:41:23 -0700283 sources += [
284 "common/dlcservice_stub.cc",
285 "common/excluder_stub.cc",
286 ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900287 }
288}
289
290# update_engine daemon.
291executable("update_engine") {
Clark Chunge6b888c2020-04-20 15:50:37 +0800292 sources = [ "main.cc" ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900293 configs += [ ":target_defaults" ]
Clark Chunge6b888c2020-04-20 15:50:37 +0800294 deps = [ ":libupdate_engine" ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900295}
296
297# update_engine client library.
298static_library("libupdate_engine_client") {
299 sources = [
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900300 "client_library/client_dbus.cc",
301 "update_status_utils.cc",
302 ]
303 include_dirs = [ "client_library/include" ]
304 configs += [ ":target_defaults" ]
305 pkg_deps = [
306 "dbus-1",
307 "libupdate_engine-client",
308 ]
309}
310
311# update_engine console client.
312executable("update_engine_client") {
313 sources = [
314 "common/error_code_utils.cc",
315 "omaha_utils.cc",
316 "update_engine_client.cc",
317 ]
318 configs += [ ":target_defaults" ]
Clark Chunge6b888c2020-04-20 15:50:37 +0800319 deps = [ ":libupdate_engine_client" ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900320}
321
322# server-side code. This is used for delta_generator and unittests but not
323# for any client code.
324static_library("libpayload_generator") {
325 sources = [
326 "common/file_fetcher.cc",
327 "payload_generator/ab_generator.cc",
328 "payload_generator/annotated_operation.cc",
329 "payload_generator/blob_file_writer.cc",
330 "payload_generator/block_mapping.cc",
331 "payload_generator/boot_img_filesystem.cc",
332 "payload_generator/bzip.cc",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900333 "payload_generator/deflate_utils.cc",
334 "payload_generator/delta_diff_generator.cc",
335 "payload_generator/delta_diff_utils.cc",
336 "payload_generator/ext2_filesystem.cc",
337 "payload_generator/extent_ranges.cc",
338 "payload_generator/extent_utils.cc",
339 "payload_generator/full_update_generator.cc",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900340 "payload_generator/mapfile_filesystem.cc",
341 "payload_generator/payload_file.cc",
342 "payload_generator/payload_generation_config.cc",
343 "payload_generator/payload_generation_config_chromeos.cc",
Amin Hassani79821002019-05-06 17:40:49 -0700344 "payload_generator/payload_properties.cc",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900345 "payload_generator/payload_signer.cc",
346 "payload_generator/raw_filesystem.cc",
347 "payload_generator/squashfs_filesystem.cc",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900348 "payload_generator/xz_chromeos.cc",
349 ]
350 configs += [ ":target_defaults" ]
351 all_dependent_pkg_deps = [
352 "ext2fs",
353 "libbsdiff",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900354 "liblzma",
Clark Chunge6b888c2020-04-20 15:50:37 +0800355 "libpuffdiff",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900356 ]
357 deps = [
358 ":libpayload_consumer",
359 ":update_metadata-protos",
360 ]
361}
362
363# server-side delta generator.
364executable("delta_generator") {
Clark Chunge6b888c2020-04-20 15:50:37 +0800365 sources = [ "payload_generator/generate_delta_main.cc" ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900366 configs += [ ":target_defaults" ]
367 configs -= [ "//common-mk:pie" ]
368 deps = [
369 ":libpayload_consumer",
370 ":libpayload_generator",
371 ]
372}
373
374if (use.test || use.fuzzer) {
375 static_library("update_engine_test_libs") {
376 sources = [
377 "common/fake_prefs.cc",
378 "common/mock_http_fetcher.cc",
379 "common/test_utils.cc",
380 "fake_shill_proxy.cc",
381 "fake_system_state.cc",
382 "payload_consumer/fake_file_descriptor.cc",
383 "payload_generator/fake_filesystem.cc",
384 "update_manager/umtest_utils.cc",
385 ]
Keigo Okaec39a222019-06-27 13:51:07 +0900386
387 # TODO(crbug.com/887845): After library odering issue is fixed,
388 # //common-mk:test can be moved in all_dependent_configs and
389 # //common-mk:test in each test configs can be removed.
390 configs += [
391 "//common-mk:test",
392 ":target_defaults",
393 ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900394 pkg_deps = [ "libshill-client-test" ]
Clark Chunge6b888c2020-04-20 15:50:37 +0800395 deps = [ ":libupdate_engine" ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900396 }
397}
398
399if (use.test) {
400 # Public keys used for unit testing.
401 genopenssl_key("update_engine-testkeys") {
402 openssl_pem_in_dir = "."
403 openssl_pem_out_dir = "include/update_engine"
404 sources = [
405 "unittest_key.pem",
406 "unittest_key2.pem",
407 ]
408 }
409
410 # Unpacks sample images used for testing.
411 tar_bunzip2("update_engine-test_images") {
412 image_out_dir = "."
Clark Chunge6b888c2020-04-20 15:50:37 +0800413 sources = [ "sample_images/sample_images.tar.bz2" ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900414 }
415
416 # Test HTTP Server.
417 executable("test_http_server") {
418 sources = [
419 "common/http_common.cc",
420 "test_http_server.cc",
421 ]
Brian Norris0ffa71f2019-07-08 10:25:54 -0700422
Keigo Okaec39a222019-06-27 13:51:07 +0900423 # //common-mk:test should be on the top.
424 # TODO(crbug.com/887845): Remove this after library odering issue is fixed.
425 configs += [
426 "//common-mk:test",
427 ":target_defaults",
428 ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900429 }
430
431 # Test subprocess helper.
432 executable("test_subprocess") {
Clark Chunge6b888c2020-04-20 15:50:37 +0800433 sources = [ "test_subprocess.cc" ]
Brian Norris0ffa71f2019-07-08 10:25:54 -0700434
Keigo Okaec39a222019-06-27 13:51:07 +0900435 # //common-mk:test should be on the top.
436 # TODO(crbug.com/887845): Remove this after library odering issue is fixed.
437 configs += [
438 "//common-mk:test",
439 ":target_defaults",
440 ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900441 }
442
443 # Main unittest file.
444 executable("update_engine_unittests") {
445 sources = [
446 "boot_control_chromeos_unittest.cc",
447 "certificate_checker_unittest.cc",
448 "common/action_pipe_unittest.cc",
449 "common/action_processor_unittest.cc",
450 "common/action_unittest.cc",
451 "common/cpu_limiter_unittest.cc",
452 "common/hash_calculator_unittest.cc",
453 "common/http_fetcher_unittest.cc",
454 "common/hwid_override_unittest.cc",
455 "common/prefs_unittest.cc",
456 "common/proxy_resolver_unittest.cc",
457 "common/subprocess_unittest.cc",
458 "common/terminator_unittest.cc",
459 "common/utils_unittest.cc",
460 "common_service_unittest.cc",
461 "connection_manager_unittest.cc",
462 "hardware_chromeos_unittest.cc",
463 "image_properties_chromeos_unittest.cc",
Jae Hoon Kim0ae8fe12019-06-26 14:32:50 -0700464 "libcurl_http_fetcher_unittest.cc",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900465 "metrics_reporter_omaha_unittest.cc",
466 "metrics_utils_unittest.cc",
467 "omaha_request_action_unittest.cc",
468 "omaha_request_builder_xml_unittest.cc",
469 "omaha_request_params_unittest.cc",
470 "omaha_response_handler_action_unittest.cc",
471 "omaha_utils_unittest.cc",
472 "p2p_manager_unittest.cc",
473 "payload_consumer/bzip_extent_writer_unittest.cc",
474 "payload_consumer/cached_file_descriptor_unittest.cc",
475 "payload_consumer/delta_performer_integration_test.cc",
476 "payload_consumer/delta_performer_unittest.cc",
477 "payload_consumer/download_action_unittest.cc",
478 "payload_consumer/extent_reader_unittest.cc",
479 "payload_consumer/extent_writer_unittest.cc",
480 "payload_consumer/file_descriptor_utils_unittest.cc",
481 "payload_consumer/file_writer_unittest.cc",
482 "payload_consumer/filesystem_verifier_action_unittest.cc",
483 "payload_consumer/postinstall_runner_action_unittest.cc",
484 "payload_consumer/xz_extent_writer_unittest.cc",
485 "payload_generator/ab_generator_unittest.cc",
486 "payload_generator/blob_file_writer_unittest.cc",
487 "payload_generator/block_mapping_unittest.cc",
488 "payload_generator/boot_img_filesystem_unittest.cc",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900489 "payload_generator/deflate_utils_unittest.cc",
490 "payload_generator/delta_diff_utils_unittest.cc",
491 "payload_generator/ext2_filesystem_unittest.cc",
492 "payload_generator/extent_ranges_unittest.cc",
493 "payload_generator/extent_utils_unittest.cc",
494 "payload_generator/full_update_generator_unittest.cc",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900495 "payload_generator/mapfile_filesystem_unittest.cc",
496 "payload_generator/payload_file_unittest.cc",
497 "payload_generator/payload_generation_config_unittest.cc",
Jae Hoon Kim4b6d1262019-06-20 10:41:18 -0700498 "payload_generator/payload_properties_unittest.cc",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900499 "payload_generator/payload_signer_unittest.cc",
500 "payload_generator/squashfs_filesystem_unittest.cc",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900501 "payload_generator/zip_unittest.cc",
502 "payload_state_unittest.cc",
503 "testrunner.cc",
504 "update_attempter_unittest.cc",
505 "update_boot_flags_action_unittest.cc",
506 "update_manager/boxed_value_unittest.cc",
507 "update_manager/chromeos_policy_unittest.cc",
508 "update_manager/evaluation_context_unittest.cc",
509 "update_manager/generic_variables_unittest.cc",
510 "update_manager/prng_unittest.cc",
511 "update_manager/real_device_policy_provider_unittest.cc",
512 "update_manager/real_random_provider_unittest.cc",
513 "update_manager/real_shill_provider_unittest.cc",
514 "update_manager/real_system_provider_unittest.cc",
515 "update_manager/real_time_provider_unittest.cc",
516 "update_manager/real_updater_provider_unittest.cc",
517 "update_manager/staging_utils_unittest.cc",
518 "update_manager/update_manager_unittest.cc",
519 "update_manager/update_time_restrictions_policy_impl_unittest.cc",
520 "update_manager/variable_unittest.cc",
521 "update_manager/weekly_time_unittest.cc",
Jae Hoon Kim916af852019-08-01 17:45:30 -0700522 "update_status_utils_unittest.cc",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900523 ]
Jae Hoon Kim38de3b12020-04-29 19:41:23 -0700524 if (use.dlc) {
525 sources += [ "excluder_chromeos_unittest.cc" ]
526 }
Brian Norris0ffa71f2019-07-08 10:25:54 -0700527
Keigo Okaec39a222019-06-27 13:51:07 +0900528 # //common-mk:test should be on the top.
529 # TODO(crbug.com/887845): Remove this after library odering issue is fixed.
530 configs += [
531 "//common-mk:test",
532 ":target_defaults",
533 ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900534 pkg_deps = [
Grace Chamb6d1b412019-10-31 14:53:42 +0900535 "libbrillo-test",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900536 "libchrome-test-${libbase_ver}",
537 "libdebugd-client-test",
538 "libpower_manager-client-test",
539 "libsession_manager-client-test",
540 "libshill-client-test",
541 ]
542 deps = [
543 ":libpayload_generator",
544 ":libupdate_engine",
545 ":update_engine_test_libs",
546 ]
547 }
548}
549
550# Fuzzer target.
551if (use.fuzzer) {
Amin Hassani6f0366d2019-10-14 14:56:43 -0700552 executable("update_engine_delta_performer_fuzzer") {
Clark Chunge6b888c2020-04-20 15:50:37 +0800553 sources = [ "payload_consumer/delta_performer_fuzzer.cc" ]
Amin Hassani6f0366d2019-10-14 14:56:43 -0700554 configs += [
555 "//common-mk/common_fuzzer",
556 ":target_defaults",
557 ]
558 pkg_deps = [
Grace Chamb6d1b412019-10-31 14:53:42 +0900559 "libbrillo-test",
Amin Hassani6f0366d2019-10-14 14:56:43 -0700560 "libchrome-test-${libbase_ver}",
561 ]
562 deps = [
563 ":libupdate_engine",
564 ":update_engine_test_libs",
565 ]
566 }
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900567 executable("update_engine_omaha_request_action_fuzzer") {
Clark Chunge6b888c2020-04-20 15:50:37 +0800568 sources = [ "omaha_request_action_fuzzer.cc" ]
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900569 configs += [
570 "//common-mk/common_fuzzer",
571 ":target_defaults",
572 ]
573 pkg_deps = [
Grace Chamb6d1b412019-10-31 14:53:42 +0900574 "libbrillo-test",
Keigo Oka0ede7bd2019-05-13 17:35:13 +0900575 "libchrome-test-${libbase_ver}",
576 ]
577 deps = [
578 ":libupdate_engine",
579 ":update_engine_test_libs",
580 ]
581 }
582}