1 # Copyright 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
10 # The core sync library.
12 'target_name': 'sync_core',
13 'type': 'static_library',
14 'variables': { 'enable_wexit_time_destructors': 1, },
19 'SYNC_IMPLEMENTATION',
22 '../base/base.gyp:base',
23 '../build/temp_gyp/googleurl.gyp:googleurl',
24 '../crypto/crypto.gyp:crypto',
25 '../google_apis/google_apis.gyp:google_apis',
28 'protocol/sync_proto.gyp:sync_proto',
31 ['OS=="linux" and chromeos==1', {
32 # Required by get_session_name.cc on Chrome OS.
34 '../chromeos/chromeos.gyp:chromeos',
38 'export_dependent_settings': [
39 # Propagate sync_proto since our headers include its generated
41 'protocol/sync_proto.gyp:sync_proto',
45 'engine/all_status.cc',
46 'engine/all_status.h',
47 'engine/apply_control_data_updates.cc',
48 'engine/apply_control_data_updates.h',
49 'engine/apply_updates_and_resolve_conflicts_command.cc',
50 'engine/apply_updates_and_resolve_conflicts_command.h',
51 'engine/backoff_delay_provider.cc',
52 'engine/backoff_delay_provider.h',
53 'engine/build_commit_command.cc',
54 'engine/build_commit_command.h',
57 'engine/conflict_resolver.cc',
58 'engine/conflict_resolver.h',
59 'engine/conflict_util.cc',
60 'engine/conflict_util.h',
61 'engine/download_updates_command.cc',
62 'engine/download_updates_command.h',
63 'engine/get_commit_ids_command.cc',
64 'engine/get_commit_ids_command.h',
65 'engine/model_changing_syncer_command.cc',
66 'engine/model_changing_syncer_command.h',
67 'engine/net/server_connection_manager.cc',
68 'engine/net/server_connection_manager.h',
69 'engine/net/url_translator.cc',
70 'engine/net/url_translator.h',
71 'engine/nudge_source.cc',
72 'engine/nudge_source.h',
73 'engine/process_commit_response_command.cc',
74 'engine/process_commit_response_command.h',
75 'engine/process_updates_command.cc',
76 'engine/process_updates_command.h',
77 'engine/store_timestamps_command.cc',
78 'engine/store_timestamps_command.h',
79 'engine/sync_engine_event.cc',
80 'engine/sync_engine_event.h',
81 'engine/sync_scheduler.cc',
82 'engine/sync_scheduler.h',
83 'engine/sync_scheduler_impl.cc',
84 'engine/sync_scheduler_impl.h',
85 'engine/sync_session_job.cc',
86 'engine/sync_session_job.h',
89 'engine/syncer_command.cc',
90 'engine/syncer_command.h',
91 'engine/syncer_proto_util.cc',
92 'engine/syncer_proto_util.h',
93 'engine/syncer_types.h',
94 'engine/syncer_util.cc',
95 'engine/syncer_util.h',
96 'engine/throttled_data_type_tracker.cc',
97 'engine/throttled_data_type_tracker.h',
98 'engine/traffic_logger.cc',
99 'engine/traffic_logger.h',
100 'engine/traffic_recorder.cc',
101 'engine/traffic_recorder.h',
102 'engine/update_applicator.cc',
103 'engine/update_applicator.h',
107 'js/js_controller.h',
108 'js/js_event_details.cc',
109 'js/js_event_details.h',
110 'js/js_event_handler.h',
111 'js/js_reply_handler.h',
112 'js/sync_js_controller.cc',
113 'js/sync_js_controller.h',
114 'protocol/proto_enum_conversions.cc',
115 'protocol/proto_enum_conversions.h',
116 'protocol/proto_value_conversions.cc',
117 'protocol/proto_value_conversions.h',
118 'protocol/sync_protocol_error.cc',
119 'protocol/sync_protocol_error.h',
120 'sessions/debug_info_getter.h',
121 'sessions/ordered_commit_set.cc',
122 'sessions/ordered_commit_set.h',
123 'sessions/status_controller.cc',
124 'sessions/status_controller.h',
125 'sessions/sync_session.cc',
126 'sessions/sync_session.h',
127 'sessions/sync_session_context.cc',
128 'sessions/sync_session_context.h',
130 'syncable/delete_journal.cc',
131 'syncable/delete_journal.h',
132 'syncable/dir_open_result.h',
133 'syncable/directory.cc',
134 'syncable/directory.h',
135 'syncable/directory_backing_store.cc',
136 'syncable/directory_backing_store.h',
137 'syncable/directory_change_delegate.h',
140 'syncable/entry_kernel.cc',
141 'syncable/entry_kernel.h',
142 'syncable/in_memory_directory_backing_store.cc',
143 'syncable/in_memory_directory_backing_store.h',
144 'syncable/invalid_directory_backing_store.cc',
145 'syncable/invalid_directory_backing_store.h',
146 'syncable/metahandle_set.h',
147 'syncable/model_type.cc',
148 'syncable/mutable_entry.cc',
149 'syncable/mutable_entry.h',
150 'syncable/nigori_handler.cc',
151 'syncable/nigori_handler.h',
152 'syncable/nigori_util.cc',
153 'syncable/nigori_util.h',
154 'syncable/on_disk_directory_backing_store.cc',
155 'syncable/on_disk_directory_backing_store.h',
156 'syncable/scoped_kernel_lock.h',
157 'syncable/syncable-inl.h',
158 'syncable/syncable_base_transaction.cc',
159 'syncable/syncable_base_transaction.h',
160 'syncable/syncable_changes_version.h',
161 'syncable/syncable_columns.h',
162 'syncable/syncable_enum_conversions.cc',
163 'syncable/syncable_enum_conversions.h',
164 'syncable/syncable_id.cc',
165 'syncable/syncable_id.h',
166 'syncable/syncable_proto_util.cc',
167 'syncable/syncable_proto_util.h',
168 'syncable/syncable_read_transaction.cc',
169 'syncable/syncable_read_transaction.h',
170 'syncable/syncable_util.cc',
171 'syncable/syncable_util.h',
172 'syncable/syncable_write_transaction.cc',
173 'syncable/syncable_write_transaction.h',
174 'syncable/transaction_observer.h',
175 'syncable/write_transaction_info.cc',
176 'syncable/write_transaction_info.h',
177 'util/cryptographer.cc',
178 'util/cryptographer.h',
180 # TODO(akalin): Figure out a better place to put
181 # data_encryption_win*; it's also used by autofill.
182 'util/data_encryption_win.cc',
183 'util/data_encryption_win.h',
185 'util/data_type_histogram.h',
187 'util/extensions_activity_monitor.cc',
188 'util/extensions_activity_monitor.h',
189 'util/get_session_name.cc',
190 'util/get_session_name.h',
191 'util/get_session_name_ios.mm',
192 'util/get_session_name_ios.h',
193 'util/get_session_name_mac.mm',
194 'util/get_session_name_mac.h',
195 'util/get_session_name_win.cc',
196 'util/get_session_name_win.h',
206 # The sync notifications library.
208 'target_name': 'sync_notifier',
209 'type': 'static_library',
210 'variables': { 'enable_wexit_time_destructors': 1, },
215 '../base/base.gyp:base',
216 '../jingle/jingle.gyp:jingle_glue',
217 '../jingle/jingle.gyp:notifier',
218 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
219 # TODO(akalin): Remove this (http://crbug.com/133352).
220 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
223 'export_dependent_settings': [
224 '../jingle/jingle.gyp:notifier',
225 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
228 'notifier/invalidation_handler.h',
229 'notifier/invalidation_state_tracker.cc',
230 'notifier/invalidation_state_tracker.h',
231 'notifier/invalidation_util.cc',
232 'notifier/invalidation_util.h',
233 'notifier/invalidator_factory.cc',
234 'notifier/invalidator_factory.h',
235 'notifier/invalidator.h',
236 'notifier/invalidator_registrar.cc',
237 'notifier/invalidator_registrar.h',
238 'notifier/invalidator_state.cc',
239 'notifier/invalidator_state.h',
240 'notifier/object_id_invalidation_map.cc',
241 'notifier/object_id_invalidation_map.h',
246 'notifier/invalidator_factory.cc',
249 ['OS != "android" and OS != "ios"', {
251 'notifier/ack_tracker.cc',
252 'notifier/ack_tracker.h',
253 'notifier/invalidation_notifier.cc',
254 'notifier/invalidation_notifier.h',
255 'notifier/non_blocking_invalidator.cc',
256 'notifier/non_blocking_invalidator.h',
257 'notifier/p2p_invalidator.cc',
258 'notifier/p2p_invalidator.h',
259 'notifier/push_client_channel.cc',
260 'notifier/push_client_channel.h',
261 'notifier/registration_manager.cc',
262 'notifier/registration_manager.h',
263 'notifier/state_writer.h',
264 'notifier/sync_invalidation_listener.cc',
265 'notifier/sync_invalidation_listener.h',
266 'notifier/sync_system_resources.cc',
267 'notifier/sync_system_resources.h',
272 '../third_party/libjingle/libjingle.gyp:libjingle',
277 # The sync internal API library.
279 'target_name': 'sync_internal_api',
280 'type': 'static_library',
281 'variables': { 'enable_wexit_time_destructors': 1, },
286 '../base/base.gyp:base',
287 '../build/temp_gyp/googleurl.gyp:googleurl',
288 '../net/net.gyp:net',
289 'protocol/sync_proto.gyp:sync_proto',
293 'export_dependent_settings': [
294 # Propagate sync_proto since our headers include its generated
296 'protocol/sync_proto.gyp:sync_proto',
300 'internal_api/base_node.cc',
301 'internal_api/base_transaction.cc',
302 'internal_api/change_record.cc',
303 'internal_api/change_reorder_buffer.cc',
304 'internal_api/change_reorder_buffer.h',
305 'internal_api/debug_info_event_listener.cc',
306 'internal_api/debug_info_event_listener.h',
307 'internal_api/http_bridge.cc',
308 'internal_api/internal_components_factory_impl.cc',
309 'internal_api/js_mutation_event_observer.cc',
310 'internal_api/js_mutation_event_observer.h',
311 'internal_api/js_sync_encryption_handler_observer.cc',
312 'internal_api/js_sync_encryption_handler_observer.h',
313 'internal_api/js_sync_manager_observer.cc',
314 'internal_api/js_sync_manager_observer.h',
315 'internal_api/public/base/enum_set.h',
316 'internal_api/public/base/invalidation.cc',
317 'internal_api/public/base/invalidation.h',
318 'internal_api/public/base/model_type.h',
319 'internal_api/public/base/model_type_invalidation_map.cc',
320 'internal_api/public/base/model_type_invalidation_map.h',
321 'internal_api/public/base/node_ordinal.cc',
322 'internal_api/public/base/node_ordinal.h',
323 'internal_api/public/base/ordinal.h',
324 'internal_api/public/base/progress_marker_map.cc',
325 'internal_api/public/base/progress_marker_map.h',
326 'internal_api/public/base/unique_position.cc',
327 'internal_api/public/base/unique_position.h',
328 'internal_api/public/base_node.h',
329 'internal_api/public/base_transaction.h',
330 'internal_api/public/change_record.h',
331 'internal_api/public/configure_reason.h',
332 'internal_api/public/data_type_association_stats.cc',
333 'internal_api/public/data_type_association_stats.h',
334 'internal_api/public/data_type_debug_info_listener.h',
335 'internal_api/public/engine/model_safe_worker.cc',
336 'internal_api/public/engine/model_safe_worker.h',
337 'internal_api/public/engine/passive_model_worker.cc',
338 'internal_api/public/engine/passive_model_worker.h',
339 'internal_api/public/engine/polling_constants.cc',
340 'internal_api/public/engine/polling_constants.h',
341 'internal_api/public/engine/sync_status.cc',
342 'internal_api/public/engine/sync_status.h',
343 'internal_api/public/http_bridge.h',
344 'internal_api/public/http_post_provider_factory.h',
345 'internal_api/public/http_post_provider_interface.h',
346 'internal_api/public/internal_components_factory_impl.h',
347 'internal_api/public/internal_components_factory.h',
348 'internal_api/public/read_node.h',
349 'internal_api/public/read_transaction.h',
350 'internal_api/public/sessions/model_neutral_state.cc',
351 'internal_api/public/sessions/model_neutral_state.h',
352 'internal_api/public/sessions/sync_session_snapshot.cc',
353 'internal_api/public/sessions/sync_session_snapshot.h',
354 'internal_api/public/sessions/sync_source_info.cc',
355 'internal_api/public/sessions/sync_source_info.h',
356 'internal_api/public/sync_encryption_handler.cc',
357 'internal_api/public/sync_encryption_handler.h',
358 'internal_api/public/sync_manager_factory.h',
359 'internal_api/public/sync_manager.cc',
360 'internal_api/public/sync_manager.h',
361 'internal_api/public/user_share.h',
362 'internal_api/public/util/experiments.h',
363 'internal_api/public/util/immutable.h',
364 'internal_api/public/util/report_unrecoverable_error_function.h',
365 'internal_api/public/util/sync_string_conversions.cc',
366 'internal_api/public/util/sync_string_conversions.h',
367 'internal_api/public/util/syncer_error.cc',
368 'internal_api/public/util/syncer_error.h',
369 'internal_api/public/util/unrecoverable_error_handler.h',
370 'internal_api/public/util/unrecoverable_error_info.cc',
371 'internal_api/public/util/unrecoverable_error_info.h',
372 'internal_api/public/util/weak_handle.cc',
373 'internal_api/public/util/weak_handle.h',
374 'internal_api/public/write_node.h',
375 'internal_api/public/write_transaction.h',
376 'internal_api/read_node.cc',
377 'internal_api/read_transaction.cc',
378 'internal_api/sync_encryption_handler_impl.cc',
379 'internal_api/sync_encryption_handler_impl.h',
380 'internal_api/sync_manager_factory.cc',
381 'internal_api/sync_manager_impl.cc',
382 'internal_api/sync_manager_impl.h',
383 'internal_api/syncapi_internal.cc',
384 'internal_api/syncapi_internal.h',
385 'internal_api/syncapi_server_connection_manager.cc',
386 'internal_api/syncapi_server_connection_manager.h',
387 'internal_api/user_share.cc',
388 'internal_api/write_node.cc',
389 'internal_api/write_transaction.cc',
393 # The sync external API library.
395 'target_name': 'sync_api',
396 'type': 'static_library',
397 'variables': { 'enable_wexit_time_destructors': 1, },
402 '../base/base.gyp:base',
403 'protocol/sync_proto.gyp:sync_proto',
406 # We avoid including header files from sync_proto in our public
407 # header files so we don't need to export its settings.
409 'api/string_ordinal.h',
410 'api/syncable_service.cc',
411 'api/syncable_service.h',
415 'api/sync_change.cc',
416 'api/sync_change_processor.h',
417 'api/sync_change_processor.cc',
420 'api/sync_error_factory.h',
421 'api/sync_error_factory.cc',
422 'api/sync_merge_result.h',
423 'api/sync_merge_result.cc',
428 # The componentized sync library.
430 'target_name': 'sync_component',
431 # TODO(rsimha): Change the type of this target to '<(component)' after
432 # exporting dependencies on 'sync_proto'.
440 'export_dependent_settings': [
448 # The public sync target. This depends on 'sync_component' and
449 # 'sync_proto' separately since 'sync_proto' isn't exportable from
450 # 'sync_component' (for now).
452 'target_name': 'sync',
456 'protocol/sync_proto.gyp:sync_proto',
458 'export_dependent_settings': [
460 'protocol/sync_proto.gyp:sync_proto',
464 # Test support files for the 'sync_core' target.
466 'target_name': 'test_support_sync_core',
467 'type': 'static_library',
468 'variables': { 'enable_wexit_time_destructors': 1, },
473 '../base/base.gyp:base',
474 '../testing/gmock.gyp:gmock',
475 '../testing/gtest.gyp:gtest',
476 'protocol/sync_proto.gyp:sync_proto',
479 'export_dependent_settings': [
480 '../testing/gmock.gyp:gmock',
481 '../testing/gtest.gyp:gtest',
482 'protocol/sync_proto.gyp:sync_proto',
486 'js/js_test_util.cc',
488 'sessions/test_util.cc',
489 'sessions/test_util.h',
490 'syncable/syncable_mock.cc',
491 'syncable/syncable_mock.h',
492 'test/callback_counter.h',
493 'test/engine/fake_model_worker.cc',
494 'test/engine/fake_model_worker.h',
495 'test/engine/fake_sync_scheduler.cc',
496 'test/engine/fake_sync_scheduler.h',
497 'test/engine/mock_connection_manager.cc',
498 'test/engine/mock_connection_manager.h',
499 'test/engine/syncer_command_test.cc',
500 'test/engine/syncer_command_test.h',
501 'test/engine/test_directory_setter_upper.cc',
502 'test/engine/test_directory_setter_upper.h',
503 'test/engine/test_id_factory.h',
504 'test/engine/test_syncable_utils.cc',
505 'test/engine/test_syncable_utils.h',
506 'test/fake_encryptor.cc',
507 'test/fake_encryptor.h',
508 'test/fake_sync_encryption_handler.h',
509 'test/fake_sync_encryption_handler.cc',
510 'test/fake_extensions_activity_monitor.cc',
511 'test/fake_extensions_activity_monitor.h',
512 'test/test_transaction_observer.cc',
513 'test/test_transaction_observer.h',
514 'test/null_directory_change_delegate.cc',
515 'test/null_directory_change_delegate.h',
516 'test/null_transaction_observer.cc',
517 'test/null_transaction_observer.h',
518 'test/sessions/test_scoped_session_event_listener.h',
519 'test/test_directory_backing_store.cc',
520 'test/test_directory_backing_store.h',
521 'util/test_unrecoverable_error_handler.cc',
522 'util/test_unrecoverable_error_handler.h',
526 # Test support files for the 'sync_notifier' target.
528 'target_name': 'test_support_sync_notifier',
529 'type': 'static_library',
534 '../testing/gmock.gyp:gmock',
535 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
539 'export_dependent_settings': [
540 '../testing/gmock.gyp:gmock',
541 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
546 'notifier/fake_invalidation_state_tracker.cc',
547 'notifier/fake_invalidation_state_tracker.h',
548 'notifier/fake_invalidator.cc',
549 'notifier/fake_invalidator.h',
550 'notifier/fake_invalidation_handler.cc',
551 'notifier/fake_invalidation_handler.h',
552 'notifier/invalidator_test_template.cc',
553 'notifier/invalidator_test_template.h',
554 'notifier/object_id_invalidation_map_test_util.cc',
555 'notifier/object_id_invalidation_map_test_util.h',
559 # Test support files for the 'sync_internal_api' target.
561 'target_name': 'test_support_sync_internal_api',
562 'type': 'static_library',
563 'variables': { 'enable_wexit_time_destructors': 1, },
568 '../base/base.gyp:base',
569 '../testing/gtest.gyp:gtest',
570 'protocol/sync_proto.gyp:sync_proto',
574 'test_support_sync_core',
576 'export_dependent_settings': [
577 '../testing/gtest.gyp:gtest',
578 'protocol/sync_proto.gyp:sync_proto',
582 'test_support_sync_core',
585 'internal_api/public/base/invalidation_test_util.cc',
586 'internal_api/public/base/invalidation_test_util.h',
587 'internal_api/public/base/model_type_invalidation_map_test_util.cc',
588 'internal_api/public/base/model_type_invalidation_map_test_util.h',
589 'internal_api/public/base/model_type_test_util.cc',
590 'internal_api/public/base/model_type_test_util.h',
591 'internal_api/public/test/fake_sync_manager.h',
592 'internal_api/public/test/test_entry_factory.h',
593 'internal_api/public/test/test_internal_components_factory.h',
594 'internal_api/public/test/test_user_share.h',
595 'internal_api/test/fake_sync_manager.cc',
596 'internal_api/test/test_entry_factory.cc',
597 'internal_api/test/test_internal_components_factory.cc',
598 'internal_api/test/test_user_share.cc',
602 # Test support files for the 'sync_api' target.
604 'target_name': 'test_support_sync_api',
605 'type': 'static_library',
610 '../testing/gmock.gyp:gmock',
613 'export_dependent_settings': [
614 '../testing/gmock.gyp:gmock',
618 'api/fake_syncable_service.cc',
619 'api/fake_syncable_service.h',
620 'api/sync_error_factory_mock.cc',
621 'api/sync_error_factory_mock.h',
625 # Unit tests for the 'sync_core' target. This cannot be a static
626 # library because the unit test files have to be compiled directly
627 # into the executable, so we push the target files to the
628 # depending executable target via direct_dependent_settings.
630 'target_name': 'sync_core_tests',
632 # We only want unit test executables to include this target.
633 'suppress_wildcard': 1,
635 '../base/base.gyp:base',
636 '../testing/gmock.gyp:gmock',
637 '../testing/gtest.gyp:gtest',
638 'protocol/sync_proto.gyp:sync_proto',
640 'test_support_sync_core',
642 # Propagate all dependencies since the actual compilation
643 # happens in the dependents.
644 'export_dependent_settings': [
645 '../base/base.gyp:base',
646 '../testing/gmock.gyp:gmock',
647 '../testing/gtest.gyp:gtest',
648 'protocol/sync_proto.gyp:sync_proto',
650 'test_support_sync_core',
652 'direct_dependent_settings': {
657 'internal_api/public/base/enum_set_unittest.cc',
658 'internal_api/public/base/model_type_invalidation_map_unittest.cc',
659 'internal_api/public/base/node_ordinal_unittest.cc',
660 'internal_api/public/base/ordinal_unittest.cc',
661 'internal_api/public/base/unique_position_unittest.cc',
662 'internal_api/public/engine/model_safe_worker_unittest.cc',
663 'internal_api/public/util/immutable_unittest.cc',
664 'internal_api/public/util/weak_handle_unittest.cc',
665 'engine/apply_control_data_updates_unittest.cc',
666 'engine/apply_updates_and_resolve_conflicts_command_unittest.cc',
667 'engine/backoff_delay_provider_unittest.cc',
668 'engine/build_commit_command_unittest.cc',
669 'engine/download_updates_command_unittest.cc',
670 'engine/model_changing_syncer_command_unittest.cc',
671 'engine/process_commit_response_command_unittest.cc',
672 'engine/process_updates_command_unittest.cc',
673 'engine/store_timestamps_command_unittest.cc',
674 'engine/sync_session_job_unittest.cc',
675 'engine/sync_scheduler_unittest.cc',
676 'engine/sync_scheduler_whitebox_unittest.cc',
677 'engine/syncer_proto_util_unittest.cc',
678 'engine/syncer_unittest.cc',
679 'engine/throttled_data_type_tracker_unittest.cc',
680 'engine/traffic_recorder_unittest.cc',
681 'js/js_arg_list_unittest.cc',
682 'js/js_event_details_unittest.cc',
683 'js/sync_js_controller_unittest.cc',
684 'protocol/proto_enum_conversions_unittest.cc',
685 'protocol/proto_value_conversions_unittest.cc',
686 'sessions/ordered_commit_set_unittest.cc',
687 'sessions/status_controller_unittest.cc',
688 'sessions/sync_session_unittest.cc',
689 'syncable/directory_backing_store_unittest.cc',
690 'syncable/model_type_unittest.cc',
691 'syncable/nigori_util_unittest.cc',
692 'syncable/syncable_enum_conversions_unittest.cc',
693 'syncable/syncable_id_unittest.cc',
694 'syncable/syncable_unittest.cc',
695 'syncable/syncable_util_unittest.cc',
696 'util/cryptographer_unittest.cc',
697 'util/data_encryption_win_unittest.cc',
698 'util/data_type_histogram_unittest.cc',
699 'util/get_session_name_unittest.cc',
700 'util/nigori_unittest.cc',
701 'util/protobuf_unittest.cc',
704 ['OS == "ios" and coverage != 0', {
706 # These sources can't be built with coverage due to a toolchain
707 # bug: http://openradar.appspot.com/radar?id=1499403
708 'engine/syncer_unittest.cc',
710 # These tests crash when run with coverage turned on due to an
711 # issue with llvm_gcda_increment_indirect_counter:
712 # http://crbug.com/156058
713 'syncable/directory_backing_store_unittest.cc',
720 # Unit tests for the 'sync_notifier' target. This cannot be a static
721 # library because the unit test files have to be compiled directly
722 # into the executable, so we push the target files to the
723 # depending executable target via direct_dependent_settings.
725 'target_name': 'sync_notifier_tests',
727 # We only want unit test executables to include this target.
728 'suppress_wildcard': 1,
730 '../base/base.gyp:base',
731 '../jingle/jingle.gyp:notifier_test_util',
732 '../net/net.gyp:net_test_support',
733 '../testing/gmock.gyp:gmock',
734 '../testing/gtest.gyp:gtest',
735 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
738 'test_support_sync_notifier',
740 # Propagate all dependencies since the actual compilation
741 # happens in the dependents.
742 'export_dependent_settings': [
743 '../base/base.gyp:base',
744 '../jingle/jingle.gyp:notifier_test_util',
745 '../net/net.gyp:net_test_support',
746 '../testing/gmock.gyp:gmock',
747 '../testing/gtest.gyp:gtest',
748 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
751 'test_support_sync_notifier',
753 'direct_dependent_settings': {
758 'notifier/invalidator_factory_unittest.cc',
763 # TODO(ios): Re-enable this test on iOS once there is an iOS
764 # implementation of invalidator_factory.
765 'notifier/invalidator_factory_unittest.cc',
766 'notifier/sync_notifier_factory_unittest.cc',
769 ['OS != "android" and OS != "ios"', {
771 'notifier/ack_tracker_unittest.cc',
772 'notifier/fake_invalidator_unittest.cc',
773 'notifier/invalidation_notifier_unittest.cc',
774 'notifier/invalidator_registrar_unittest.cc',
775 'notifier/non_blocking_invalidator_unittest.cc',
776 'notifier/p2p_invalidator_unittest.cc',
777 'notifier/push_client_channel_unittest.cc',
778 'notifier/registration_manager_unittest.cc',
779 'notifier/sync_invalidation_listener_unittest.cc',
780 'notifier/sync_system_resources_unittest.cc',
788 '../third_party/libjingle/libjingle.gyp:libjingle',
790 'export_dependent_settings': [
791 '../third_party/libjingle/libjingle.gyp:libjingle',
797 # Unit tests for the 'sync_internal_api' target. This cannot be a static
798 # library because the unit test files have to be compiled directly
799 # into the executable, so we push the target files to the
800 # depending executable target via direct_dependent_settings.
802 'target_name': 'sync_internal_api_tests',
804 # We only want unit test executables to include this target.
805 'suppress_wildcard': 1,
807 '../base/base.gyp:base',
808 '../net/net.gyp:net',
809 '../net/net.gyp:net_test_support',
810 '../testing/gmock.gyp:gmock',
811 '../testing/gtest.gyp:gtest',
812 'protocol/sync_proto.gyp:sync_proto',
816 'test_support_sync_internal_api',
818 # Propagate all dependencies since the actual compilation
819 # happens in the dependents.
820 'export_dependent_settings': [
821 '../base/base.gyp:base',
822 '../net/net.gyp:net',
823 '../net/net.gyp:net_test_support',
824 '../testing/gmock.gyp:gmock',
825 '../testing/gtest.gyp:gtest',
826 'protocol/sync_proto.gyp:sync_proto',
830 'test_support_sync_internal_api',
832 'direct_dependent_settings': {
837 'internal_api/debug_info_event_listener_unittest.cc',
838 'internal_api/http_bridge_unittest.cc',
839 'internal_api/js_mutation_event_observer_unittest.cc',
840 'internal_api/js_sync_encryption_handler_observer_unittest.cc',
841 'internal_api/js_sync_manager_observer_unittest.cc',
842 'internal_api/public/change_record_unittest.cc',
843 'internal_api/public/sessions/sync_session_snapshot_unittest.cc',
844 'internal_api/public/sessions/sync_source_info_unittest.cc',
845 'internal_api/syncapi_server_connection_manager_unittest.cc',
846 'internal_api/sync_encryption_handler_impl_unittest.cc',
847 'internal_api/sync_manager_impl_unittest.cc',
852 'internal_api/http_bridge_unittest.cc',
859 # Unit tests for the 'sync_api' target. This cannot be a static
860 # library because the unit test files have to be compiled directly
861 # into the executable, so we push the target files to the
862 # depending executable target via direct_dependent_settings.
864 'target_name': 'sync_api_tests',
866 # We only want unit test executables to include this target.
867 'suppress_wildcard': 1,
869 '../base/base.gyp:base',
870 '../testing/gtest.gyp:gtest',
871 'protocol/sync_proto.gyp:sync_proto',
874 'test_support_sync_internal_api',
876 # Propagate all dependencies since the actual compilation
877 # happens in the dependents.
878 'export_dependent_settings': [
879 '../base/base.gyp:base',
880 '../testing/gtest.gyp:gtest',
881 'protocol/sync_proto.gyp:sync_proto',
884 'test_support_sync_internal_api',
886 'direct_dependent_settings': {
891 'api/sync_change_unittest.cc',
892 'api/sync_error_unittest.cc',
893 'api/sync_merge_result_unittest.cc',
898 # The unit test executable for sync tests.
900 'target_name': 'sync_unit_tests',
901 'type': '<(gtest_target_type)',
902 # Typed-parametrized tests generate exit-time destructors.
903 'variables': { 'enable_wexit_time_destructors': 0, },
905 '../base/base.gyp:run_all_unittests',
909 'sync_internal_api_tests',
910 'sync_notifier_tests',
913 # TODO(akalin): This is needed because histogram.cc uses
914 # leak_annotations.h, which pulls this in. Make 'base'
915 # propagate this dependency.
916 ['OS=="linux" and linux_use_tcmalloc==1', {
918 '../base/allocator/allocator.gyp:allocator',
921 ['OS == "android" and gtest_target_type == "shared_library"', {
923 '../testing/android/native_test.gyp:native_test_native_code',
933 'target_name': 'sync_tools_helper',
934 'type': 'static_library',
939 '../base/base.gyp:base',
942 'export_dependent_settings': [
943 '../base/base.gyp:base',
947 'tools/null_invalidation_state_tracker.cc',
948 'tools/null_invalidation_state_tracker.h',
951 # A tool to listen to sync notifications and print them out.
953 'target_name': 'sync_listen_notifications',
954 'type': 'executable',
956 '../base/base.gyp:base',
957 '../jingle/jingle.gyp:notifier',
958 '../net/net.gyp:net',
959 '../net/net.gyp:net_test_support',
964 'tools/sync_listen_notifications.cc',
968 # A standalone command-line sync client.
970 'target_name': 'sync_client',
971 'type': 'executable',
976 '../base/base.gyp:base',
977 '../jingle/jingle.gyp:notifier',
978 '../net/net.gyp:net',
979 '../net/net.gyp:net_test_support',
984 'tools/sync_client.cc',
990 # Special target to wrap a gtest_target_type==shared_library
991 # sync_unit_tests into an android apk for execution.
992 ['OS == "android" and gtest_target_type == "shared_library"', {
995 'target_name': 'sync_unit_tests_apk',
1001 'test_suite_name': 'sync_unit_tests',
1002 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sync_unit_tests<(SHARED_LIB_SUFFIX)',
1004 'includes': [ '../build/apk_test.gypi' ],