1 # Copyright 2013 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.
7 # Test support files for the 'sync_core' target.
9 'target_name': 'test_support_sync_core',
10 'type': 'static_library',
11 'variables': { 'enable_wexit_time_destructors': 1, },
19 '../base/base.gyp:base',
20 '../testing/gmock.gyp:gmock',
21 '../testing/gtest.gyp:gtest',
24 'export_dependent_settings': [
25 '../testing/gmock.gyp:gmock',
26 '../testing/gtest.gyp:gtest',
30 'internal_api/public/base/model_type_test_util.cc',
31 'internal_api/public/base/model_type_test_util.h',
34 'sessions/test_util.cc',
35 'sessions/test_util.h',
36 'test/callback_counter.h',
37 'test/engine/fake_model_worker.cc',
38 'test/engine/fake_model_worker.h',
39 'test/engine/fake_sync_scheduler.cc',
40 'test/engine/fake_sync_scheduler.h',
41 'test/engine/mock_connection_manager.cc',
42 'test/engine/mock_connection_manager.h',
43 'test/engine/test_directory_setter_upper.cc',
44 'test/engine/test_directory_setter_upper.h',
45 'test/engine/test_id_factory.h',
46 'test/engine/test_syncable_utils.cc',
47 'test/engine/test_syncable_utils.h',
48 'test/fake_encryptor.cc',
49 'test/fake_encryptor.h',
50 'test/fake_sync_encryption_handler.cc',
51 'test/fake_sync_encryption_handler.h',
52 'test/null_directory_change_delegate.cc',
53 'test/null_directory_change_delegate.h',
54 'test/null_transaction_observer.cc',
55 'test/null_transaction_observer.h',
56 'test/sessions/test_scoped_session_event_listener.h',
57 'test/sessions/mock_debug_info_getter.h',
58 'test/sessions/mock_debug_info_getter.cc',
59 'test/test_directory_backing_store.cc',
60 'test/test_directory_backing_store.h',
61 'test/test_transaction_observer.cc',
62 'test/test_transaction_observer.h',
63 'util/test_unrecoverable_error_handler.cc',
64 'util/test_unrecoverable_error_handler.h',
68 # Test support files for the python sync test server.
70 'target_name': 'test_support_sync_testserver',
71 'type': 'static_library',
72 'variables': { 'enable_wexit_time_destructors': 1, },
77 '../base/base.gyp:base',
78 '../net/net.gyp:net_test_support',
79 # The sync test server uses Python modules generated by the sync protos.
80 '../third_party/protobuf/protobuf.gyp:py_proto',
83 'export_dependent_settings': [
84 '../base/base.gyp:base',
85 '../net/net.gyp:net_test_support',
88 'test/local_sync_test_server.cc',
89 'test/local_sync_test_server.h',
93 # Test support files for the fake sync server.
95 'target_name': 'test_support_sync_fake_server',
96 'type': 'static_library',
97 'variables': { 'enable_wexit_time_destructors': 1, },
102 '../base/base.gyp:base',
103 '../net/net.gyp:net',
106 'export_dependent_settings': [
110 'test/fake_server/fake_server.h',
111 'test/fake_server/fake_server.cc',
112 'test/fake_server/fake_server_http_post_provider.h',
113 'test/fake_server/fake_server_http_post_provider.cc',
114 'test/fake_server/fake_server_network_resources.h',
115 'test/fake_server/fake_server_network_resources.cc',
119 # Test support files for the 'sync_notifier' target.
121 'target_name': 'test_support_sync_notifier',
122 'type': 'static_library',
130 '../testing/gmock.gyp:gmock',
131 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
134 'export_dependent_settings': [
135 '../testing/gmock.gyp:gmock',
136 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
140 'notifier/fake_invalidation_handler.cc',
141 'notifier/fake_invalidation_handler.h',
142 'notifier/fake_invalidation_state_tracker.cc',
143 'notifier/fake_invalidation_state_tracker.h',
144 'notifier/fake_invalidator.cc',
145 'notifier/fake_invalidator.h',
146 'notifier/invalidator_test_template.cc',
147 'notifier/invalidator_test_template.h',
148 'notifier/unacked_invalidation_set_test_util.cc',
149 'notifier/unacked_invalidation_set_test_util.h',
150 'internal_api/public/base/object_id_invalidation_map_test_util.h',
151 'internal_api/public/base/object_id_invalidation_map_test_util.cc',
155 # Test support files for the 'sync_internal_api' target.
157 'target_name': 'test_support_sync_internal_api',
158 'type': 'static_library',
159 'variables': { 'enable_wexit_time_destructors': 1, },
167 '../base/base.gyp:base',
168 '../testing/gtest.gyp:gtest',
170 'test_support_sync_core',
172 'export_dependent_settings': [
173 '../testing/gtest.gyp:gtest',
175 'test_support_sync_core',
178 'internal_api/public/base/invalidation_test_util.cc',
179 'internal_api/public/base/invalidation_test_util.h',
180 'internal_api/public/test/fake_sync_manager.h',
181 'internal_api/public/test/sync_manager_factory_for_profile_sync_test.h',
182 'internal_api/public/test/test_entry_factory.h',
183 'internal_api/public/test/test_internal_components_factory.h',
184 'internal_api/public/test/test_user_share.h',
185 'internal_api/test/fake_sync_manager.cc',
186 'internal_api/test/sync_manager_factory_for_profile_sync_test.cc',
187 'internal_api/test/sync_manager_for_profile_sync_test.cc',
188 'internal_api/test/sync_manager_for_profile_sync_test.h',
189 'internal_api/test/test_entry_factory.cc',
190 'internal_api/test/test_internal_components_factory.cc',
191 'internal_api/test/test_user_share.cc',
195 # Test support files for the 'sync_api' target.
197 'target_name': 'test_support_sync_api',
198 'type': 'static_library',
206 '../testing/gmock.gyp:gmock',
209 'export_dependent_settings': [
210 '../testing/gmock.gyp:gmock',
214 'api/fake_syncable_service.cc',
215 'api/fake_syncable_service.h',
216 'api/fake_sync_change_processor.cc',
217 'api/fake_sync_change_processor.h',
218 'api/sync_error_factory_mock.cc',
219 'api/sync_error_factory_mock.h',
223 # Unit tests for the 'sync_core' target. This cannot be a static
224 # library because the unit test files have to be compiled directly
225 # into the executable, so we push the target files to the
226 # depending executable target via direct_dependent_settings.
228 'target_name': 'sync_core_tests',
230 # We only want unit test executables to include this target.
231 'suppress_wildcard': 1,
233 '../base/base.gyp:base',
234 '../sql/sql.gyp:sql',
235 '../testing/gmock.gyp:gmock',
236 '../testing/gtest.gyp:gtest',
238 'test_support_sync_core',
241 ['OS=="linux" and chromeos==1', {
242 # Required by get_session_name_unittest.cc on Chrome OS.
244 '../chromeos/chromeos.gyp:chromeos',
248 # Propagate all dependencies since the actual compilation
249 # happens in the dependents.
250 'export_dependent_settings': [
251 '../base/base.gyp:base',
252 '../sql/sql.gyp:sql',
253 '../testing/gmock.gyp:gmock',
254 '../testing/gtest.gyp:gtest',
256 'test_support_sync_core',
258 'direct_dependent_settings': {
263 'internal_api/public/base/cancelation_signal_unittest.cc',
264 'internal_api/public/base/enum_set_unittest.cc',
265 'internal_api/public/base/node_ordinal_unittest.cc',
266 'internal_api/public/base/ordinal_unittest.cc',
267 'internal_api/public/base/unique_position_unittest.cc',
268 'internal_api/public/engine/model_safe_worker_unittest.cc',
269 'internal_api/public/util/immutable_unittest.cc',
270 'internal_api/public/util/weak_handle_unittest.cc',
271 'engine/apply_control_data_updates_unittest.cc',
272 'engine/backoff_delay_provider_unittest.cc',
273 'engine/download_unittest.cc',
274 'engine/sync_directory_commit_contribution_unittest.cc',
275 'engine/sync_directory_update_handler_unittest.cc',
276 'engine/sync_scheduler_unittest.cc',
277 'engine/syncer_proto_util_unittest.cc',
278 'engine/syncer_unittest.cc',
279 'engine/traffic_recorder_unittest.cc',
280 'js/js_arg_list_unittest.cc',
281 'js/js_event_details_unittest.cc',
282 'js/sync_js_controller_unittest.cc',
283 'protocol/proto_enum_conversions_unittest.cc',
284 'protocol/proto_value_conversions_unittest.cc',
285 'sessions/model_type_registry_unittest.cc',
286 'sessions/nudge_tracker_unittest.cc',
287 'sessions/status_controller_unittest.cc',
288 'syncable/directory_backing_store_unittest.cc',
289 'syncable/model_type_unittest.cc',
290 'syncable/nigori_util_unittest.cc',
291 'syncable/parent_child_index_unittest.cc',
292 'syncable/syncable_enum_conversions_unittest.cc',
293 'syncable/syncable_id_unittest.cc',
294 'syncable/syncable_unittest.cc',
295 'syncable/syncable_util_unittest.cc',
296 'util/cryptographer_unittest.cc',
297 'util/data_type_histogram_unittest.cc',
298 'util/get_session_name_unittest.cc',
299 'util/nigori_unittest.cc',
300 'util/protobuf_unittest.cc',
305 # Unit tests for the 'sync_notifier' target. This cannot be a static
306 # library because the unit test files have to be compiled directly
307 # into the executable, so we push the target files to the
308 # depending executable target via direct_dependent_settings.
310 'target_name': 'sync_notifier_tests',
312 # We only want unit test executables to include this target.
313 'suppress_wildcard': 1,
315 '../base/base.gyp:base',
316 '../google_apis/google_apis.gyp:google_apis',
317 '../jingle/jingle.gyp:notifier_test_util',
318 '../net/net.gyp:net_test_support',
319 '../testing/gmock.gyp:gmock',
320 '../testing/gtest.gyp:gtest',
321 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
322 '../third_party/libjingle/libjingle.gyp:libjingle',
324 'test_support_sync_notifier',
326 # Propagate all dependencies since the actual compilation
327 # happens in the dependents.
328 'export_dependent_settings': [
329 '../base/base.gyp:base',
330 '../google_apis/google_apis.gyp:google_apis',
331 '../jingle/jingle.gyp:notifier_test_util',
332 '../net/net.gyp:net_test_support',
333 '../testing/gmock.gyp:gmock',
334 '../testing/gtest.gyp:gtest',
335 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
336 '../third_party/libjingle/libjingle.gyp:libjingle',
338 'test_support_sync_notifier',
340 'direct_dependent_settings': {
345 ['OS != "android"', {
347 'notifier/fake_invalidator_unittest.cc',
348 'notifier/gcm_network_channel_unittest.cc',
349 'notifier/invalidation_notifier_unittest.cc',
350 'notifier/invalidator_registrar_unittest.cc',
351 'notifier/non_blocking_invalidator_unittest.cc',
352 'notifier/object_id_invalidation_map_unittest.cc',
353 'notifier/p2p_invalidator_unittest.cc',
354 'notifier/push_client_channel_unittest.cc',
355 'notifier/registration_manager_unittest.cc',
356 'notifier/single_object_invalidation_set_unittest.cc',
357 'notifier/sync_invalidation_listener_unittest.cc',
358 'notifier/sync_system_resources_unittest.cc',
359 'notifier/unacked_invalidation_set_unittest.cc',
366 # Unit tests for the 'sync_internal_api' target. This cannot be a static
367 # library because the unit test files have to be compiled directly
368 # into the executable, so we push the target files to the
369 # depending executable target via direct_dependent_settings.
371 'target_name': 'sync_internal_api_tests',
373 # We only want unit test executables to include this target.
374 'suppress_wildcard': 1,
376 '../base/base.gyp:base',
377 '../net/net.gyp:net',
378 '../net/net.gyp:net_test_support',
379 '../testing/gmock.gyp:gmock',
380 '../testing/gtest.gyp:gtest',
382 'test_support_sync_internal_api',
384 # Propagate all dependencies since the actual compilation
385 # happens in the dependents.
386 'export_dependent_settings': [
387 '../base/base.gyp:base',
388 '../net/net.gyp:net',
389 '../net/net.gyp:net_test_support',
390 '../testing/gmock.gyp:gmock',
391 '../testing/gtest.gyp:gtest',
393 'test_support_sync_internal_api',
395 'direct_dependent_settings': {
400 'internal_api/debug_info_event_listener_unittest.cc',
401 'internal_api/http_bridge_unittest.cc',
402 'internal_api/js_mutation_event_observer_unittest.cc',
403 'internal_api/js_sync_encryption_handler_observer_unittest.cc',
404 'internal_api/js_sync_manager_observer_unittest.cc',
405 'internal_api/public/change_record_unittest.cc',
406 'internal_api/public/sessions/sync_session_snapshot_unittest.cc',
407 'internal_api/syncapi_server_connection_manager_unittest.cc',
408 'internal_api/sync_encryption_handler_impl_unittest.cc',
409 'internal_api/sync_manager_impl_unittest.cc',
414 'internal_api/http_bridge_unittest.cc',
421 # Unit tests for the 'sync_api' target. This cannot be a static
422 # library because the unit test files have to be compiled directly
423 # into the executable, so we push the target files to the
424 # depending executable target via direct_dependent_settings.
426 'target_name': 'sync_api_tests',
428 # We only want unit test executables to include this target.
429 'suppress_wildcard': 1,
431 '../base/base.gyp:base',
432 '../testing/gtest.gyp:gtest',
434 'test_support_sync_internal_api',
436 # Propagate all dependencies since the actual compilation
437 # happens in the dependents.
438 'export_dependent_settings': [
439 '../base/base.gyp:base',
440 '../testing/gtest.gyp:gtest',
442 'test_support_sync_internal_api',
444 'direct_dependent_settings': {
449 'api/attachments/attachment_unittest.cc',
450 'api/attachments/fake_attachment_store_unittest.cc',
451 'api/sync_change_unittest.cc',
452 'api/sync_error_unittest.cc',
453 'api/sync_merge_result_unittest.cc',
458 # The unit test executable for sync tests.
460 'target_name': 'sync_unit_tests',
461 'type': '<(gtest_target_type)',
462 # Typed-parametrized tests generate exit-time destructors.
463 'variables': { 'enable_wexit_time_destructors': 0, },
468 '../base/base.gyp:run_all_unittests',
471 'sync_internal_api_tests',
472 'sync_notifier_tests',
475 # TODO(akalin): This is needed because histogram.cc uses
476 # leak_annotations.h, which pulls this in. Make 'base'
477 # propagate this dependency.
478 ['OS=="linux" and linux_use_tcmalloc==1', {
480 '../base/allocator/allocator.gyp:allocator',
483 ['OS == "android" and gtest_target_type == "shared_library"', {
485 '../testing/android/native_test.gyp:native_test_native_code',
491 # Test support files for using the Test Accounts service.
493 'target_name': 'test_support_accounts_client',
494 'type': 'static_library',
495 'direct_dependent_settings': {
501 '../base/base.gyp:base',
502 '../net/net.gyp:net',
505 'test/accounts_client/test_accounts_client.cc',
506 'test/accounts_client/test_accounts_client.h',
507 'test/accounts_client/url_request_context_getter.cc',
508 'test/accounts_client/url_request_context_getter.h',
512 # The Sync end-to-end (and associated infrastructure) tests.
514 'target_name': 'sync_endtoend_tests',
515 'type': '<(gtest_target_type)',
517 '../base/base.gyp:run_all_unittests',
518 '../testing/gmock.gyp:gmock',
519 '../testing/gtest.gyp:gtest',
520 '../url/url.gyp:url_lib',
521 'test_support_accounts_client',
524 'test/accounts_client/test_accounts_client_unittest.cc',
533 'target_name': 'sync_tools_helper',
534 'type': 'static_library',
536 'SYNC_IMPLEMENTATION',
542 '../base/base.gyp:base',
545 'export_dependent_settings': [
546 '../base/base.gyp:base',
550 'tools/null_invalidation_state_tracker.cc',
551 'tools/null_invalidation_state_tracker.h',
555 # A tool that can be used to launch a python sync server instance.
557 'target_name': 'run_sync_testserver',
558 'type': 'executable',
560 '../base/base.gyp:base',
561 '../base/base.gyp:test_support_base',
562 '../net/net.gyp:net_test_support',
563 '../testing/gtest.gyp:gtest',
564 'test_support_sync_testserver',
567 'tools/testserver/run_sync_testserver.cc',
571 # A tool to listen to sync notifications and print them out.
573 'target_name': 'sync_listen_notifications',
574 'type': 'executable',
579 '../base/base.gyp:base',
580 '../jingle/jingle.gyp:notifier',
581 '../net/net.gyp:net',
582 '../net/net.gyp:net_test_support',
587 'tools/sync_listen_notifications.cc',
591 # A standalone command-line sync client.
593 'target_name': 'sync_client',
594 'type': 'executable',
599 '../base/base.gyp:base',
600 '../jingle/jingle.gyp:notifier',
601 '../net/net.gyp:net',
602 '../net/net.gyp:net_test_support',
605 'test_support_sync_core'
608 'tools/sync_client.cc',
613 ['OS == "android"', {
616 'target_name': 'sync_javatests',
619 'java_in_dir': '../sync/android/javatests',
623 'sync_java_test_support',
624 '../base/base.gyp:base_java_test_support',
626 'includes': [ '../build/java.gypi' ],
629 'target_name': 'sync_java_test_support',
632 'package_name': 'sync_java_test_support',
633 'java_in_dir': '../sync/test/android/javatests',
638 'includes': [ '../build/java.gypi' ],
642 # Special target to wrap a gtest_target_type==shared_library
643 # sync_unit_tests into an android apk for execution.
644 ['OS == "android" and gtest_target_type == "shared_library"', {
647 'target_name': 'sync_unit_tests_apk',
653 'test_suite_name': 'sync_unit_tests',
654 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sync_unit_tests<(SHARED_LIB_SUFFIX)',
656 'includes': [ '../build/apk_test.gypi' ],