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/injectable_sync_context_proxy.cc',
42 'test/engine/injectable_sync_context_proxy.h',
43 'test/engine/mock_connection_manager.cc',
44 'test/engine/mock_connection_manager.h',
45 'test/engine/mock_model_type_sync_proxy.cc',
46 'test/engine/mock_model_type_sync_proxy.h',
47 'test/engine/mock_model_type_sync_worker.cc',
48 'test/engine/mock_model_type_sync_worker.h',
49 'test/engine/mock_update_handler.cc',
50 'test/engine/mock_update_handler.h',
51 'test/engine/single_type_mock_server.cc',
52 'test/engine/single_type_mock_server.h',
53 'test/engine/test_directory_setter_upper.cc',
54 'test/engine/test_directory_setter_upper.h',
55 'test/engine/test_id_factory.h',
56 'test/engine/test_syncable_utils.cc',
57 'test/engine/test_syncable_utils.h',
58 'test/fake_encryptor.cc',
59 'test/fake_encryptor.h',
60 'test/fake_sync_encryption_handler.cc',
61 'test/fake_sync_encryption_handler.h',
62 'test/null_directory_change_delegate.cc',
63 'test/null_directory_change_delegate.h',
64 'test/null_transaction_observer.cc',
65 'test/null_transaction_observer.h',
66 'test/sessions/test_scoped_session_event_listener.h',
67 'test/sessions/mock_debug_info_getter.h',
68 'test/sessions/mock_debug_info_getter.cc',
69 'test/test_directory_backing_store.cc',
70 'test/test_directory_backing_store.h',
71 'test/test_transaction_observer.cc',
72 'test/test_transaction_observer.h',
73 'util/test_unrecoverable_error_handler.cc',
74 'util/test_unrecoverable_error_handler.h',
78 # Test support files for the python sync test server.
80 'target_name': 'test_support_sync_testserver',
81 'type': 'static_library',
82 'variables': { 'enable_wexit_time_destructors': 1, },
87 '../base/base.gyp:base',
88 '../net/net.gyp:net_test_support',
89 # The sync test server uses Python modules generated by the sync protos.
90 '../third_party/protobuf/protobuf.gyp:py_proto',
93 'export_dependent_settings': [
94 '../base/base.gyp:base',
95 '../net/net.gyp:net_test_support',
98 'test/local_sync_test_server.cc',
99 'test/local_sync_test_server.h',
103 # Test support files for the fake sync server.
105 'target_name': 'test_support_sync_fake_server',
106 'type': 'static_library',
107 'variables': { 'enable_wexit_time_destructors': 1, },
112 '../base/base.gyp:base',
113 '../net/net.gyp:net',
114 '../testing/gtest.gyp:gtest',
115 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
118 'export_dependent_settings': [
122 'test/fake_server/bookmark_entity.cc',
123 'test/fake_server/bookmark_entity.h',
124 'test/fake_server/bookmark_entity_builder.cc',
125 'test/fake_server/bookmark_entity_builder.h',
126 'test/fake_server/entity_builder.cc',
127 'test/fake_server/entity_builder.h',
128 'test/fake_server/entity_builder_factory.cc',
129 'test/fake_server/entity_builder_factory.h',
130 'test/fake_server/fake_server.cc',
131 'test/fake_server/fake_server.h',
132 'test/fake_server/fake_server_entity.cc',
133 'test/fake_server/fake_server_entity.h',
134 'test/fake_server/fake_server_http_post_provider.cc',
135 'test/fake_server/fake_server_http_post_provider.h',
136 'test/fake_server/fake_server_network_resources.cc',
137 'test/fake_server/fake_server_network_resources.h',
138 'test/fake_server/fake_server_verifier.cc',
139 'test/fake_server/fake_server_verifier.h',
140 'test/fake_server/permanent_entity.cc',
141 'test/fake_server/permanent_entity.h',
142 'test/fake_server/tombstone_entity.cc',
143 'test/fake_server/tombstone_entity.h',
144 'test/fake_server/unique_client_entity.cc',
145 'test/fake_server/unique_client_entity.h',
149 # Test support files for the 'sync_notifier' target.
151 'target_name': 'test_support_sync_notifier',
152 'type': 'static_library',
160 '../testing/gmock.gyp:gmock',
161 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
164 'export_dependent_settings': [
165 '../testing/gmock.gyp:gmock',
166 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
170 'notifier/unacked_invalidation_set_test_util.cc',
171 'notifier/unacked_invalidation_set_test_util.h',
172 'internal_api/public/base/object_id_invalidation_map_test_util.h',
173 'internal_api/public/base/object_id_invalidation_map_test_util.cc',
177 # Test support files for the 'sync_internal_api' target.
179 'target_name': 'test_support_sync_internal_api',
180 'type': 'static_library',
181 'variables': { 'enable_wexit_time_destructors': 1, },
189 '../base/base.gyp:base',
190 '../testing/gtest.gyp:gtest',
192 'test_support_sync_core',
194 'export_dependent_settings': [
195 '../testing/gtest.gyp:gtest',
197 'test_support_sync_core',
200 'internal_api/public/base/invalidation_test_util.cc',
201 'internal_api/public/base/invalidation_test_util.h',
202 'internal_api/public/test/fake_sync_manager.h',
203 'internal_api/public/test/null_sync_context_proxy.h',
204 'internal_api/public/test/sync_manager_factory_for_profile_sync_test.h',
205 'internal_api/public/test/test_entry_factory.h',
206 'internal_api/public/test/test_internal_components_factory.h',
207 'internal_api/public/test/test_user_share.h',
208 'internal_api/test/fake_sync_manager.cc',
209 'internal_api/test/null_sync_context_proxy.cc',
210 'internal_api/test/sync_manager_factory_for_profile_sync_test.cc',
211 'internal_api/test/sync_manager_for_profile_sync_test.cc',
212 'internal_api/test/sync_manager_for_profile_sync_test.h',
213 'internal_api/test/test_entry_factory.cc',
214 'internal_api/test/test_internal_components_factory.cc',
215 'internal_api/test/test_user_share.cc',
219 # Test support files for the 'sync_api' target.
221 'target_name': 'test_support_sync_api',
222 'type': 'static_library',
230 '../testing/gmock.gyp:gmock',
233 'export_dependent_settings': [
234 '../testing/gmock.gyp:gmock',
238 'api/fake_syncable_service.cc',
239 'api/fake_syncable_service.h',
240 'api/fake_sync_change_processor.cc',
241 'api/fake_sync_change_processor.h',
242 'api/sync_change_processor_wrapper_for_test.cc',
243 'api/sync_change_processor_wrapper_for_test.h',
244 'api/sync_error_factory_mock.cc',
245 'api/sync_error_factory_mock.h',
249 # Unit tests for the 'sync_core' target. This cannot be a static
250 # library because the unit test files have to be compiled directly
251 # into the executable, so we push the target files to the
252 # depending executable target via direct_dependent_settings.
254 'target_name': 'sync_core_tests',
256 # We only want unit test executables to include this target.
257 'suppress_wildcard': 1,
259 '../base/base.gyp:base',
260 '../sql/sql.gyp:sql',
261 '../testing/gmock.gyp:gmock',
262 '../testing/gtest.gyp:gtest',
264 'test_support_sync_core',
267 ['OS=="linux" and chromeos==1', {
268 # Required by get_session_name_unittest.cc on Chrome OS.
270 '../chromeos/chromeos.gyp:chromeos',
274 # Propagate all dependencies since the actual compilation
275 # happens in the dependents.
276 'export_dependent_settings': [
277 '../base/base.gyp:base',
278 '../sql/sql.gyp:sql',
279 '../testing/gmock.gyp:gmock',
280 '../testing/gtest.gyp:gtest',
282 'test_support_sync_core',
284 'direct_dependent_settings': {
289 'internal_api/public/base/attachment_id_proto_unittest.cc',
290 'internal_api/public/base/cancelation_signal_unittest.cc',
291 'internal_api/public/base/enum_set_unittest.cc',
292 'internal_api/public/base/node_ordinal_unittest.cc',
293 'internal_api/public/base/ordinal_unittest.cc',
294 'internal_api/public/base/unique_position_unittest.cc',
295 'internal_api/public/engine/model_safe_worker_unittest.cc',
296 'internal_api/public/util/immutable_unittest.cc',
297 'internal_api/public/util/weak_handle_unittest.cc',
298 'engine/apply_control_data_updates_unittest.cc',
299 'engine/backoff_delay_provider_unittest.cc',
300 'engine/directory_commit_contribution_unittest.cc',
301 'engine/directory_update_handler_unittest.cc',
302 'engine/entity_tracker_unittest.cc',
303 'engine/get_updates_processor_unittest.cc',
304 'engine/model_type_entity_unittest.cc',
305 'engine/model_type_sync_proxy_impl_unittest.cc',
306 'engine/model_type_sync_worker_impl_unittest.cc',
307 'engine/sync_scheduler_unittest.cc',
308 'engine/syncer_proto_util_unittest.cc',
309 'engine/syncer_unittest.cc',
310 'engine/syncer_util_unittest.cc',
311 'js/js_event_details_unittest.cc',
312 'js/sync_js_controller_unittest.cc',
313 'protocol/proto_enum_conversions_unittest.cc',
314 'protocol/proto_value_conversions_unittest.cc',
315 'sessions/model_type_registry_unittest.cc',
316 'sessions/nudge_tracker_unittest.cc',
317 'sessions/status_controller_unittest.cc',
318 'syncable/directory_unittest.cc',
319 'syncable/directory_unittest.h',
320 'syncable/directory_backing_store_unittest.cc',
321 'syncable/entry_kernel_unittest.cc',
322 'syncable/model_type_unittest.cc',
323 'syncable/nigori_util_unittest.cc',
324 'syncable/parent_child_index_unittest.cc',
325 'syncable/syncable_enum_conversions_unittest.cc',
326 'syncable/syncable_id_unittest.cc',
327 'syncable/syncable_unittest.cc',
328 'syncable/syncable_util_unittest.cc',
329 'util/cryptographer_unittest.cc',
330 'util/data_type_histogram_unittest.cc',
331 'util/get_session_name_unittest.cc',
332 'util/nigori_unittest.cc',
333 'util/protobuf_unittest.cc',
338 # Unit tests for the 'sync_notifier' target. This cannot be a static
339 # library because the unit test files have to be compiled directly
340 # into the executable, so we push the target files to the
341 # depending executable target via direct_dependent_settings.
343 'target_name': 'sync_notifier_tests',
345 # We only want unit test executables to include this target.
346 'suppress_wildcard': 1,
348 '../base/base.gyp:base',
349 '../google_apis/google_apis.gyp:google_apis',
350 '../jingle/jingle.gyp:notifier_test_util',
351 '../net/net.gyp:net_test_support',
352 '../testing/gmock.gyp:gmock',
353 '../testing/gtest.gyp:gtest',
354 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
355 '../third_party/libjingle/libjingle.gyp:libjingle',
357 'test_support_sync_notifier',
359 # Propagate all dependencies since the actual compilation
360 # happens in the dependents.
361 'export_dependent_settings': [
362 '../base/base.gyp:base',
363 '../google_apis/google_apis.gyp:google_apis',
364 '../jingle/jingle.gyp:notifier_test_util',
365 '../net/net.gyp:net_test_support',
366 '../testing/gmock.gyp:gmock',
367 '../testing/gtest.gyp:gtest',
368 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
369 '../third_party/libjingle/libjingle.gyp:libjingle',
371 'test_support_sync_notifier',
373 'direct_dependent_settings': {
378 ['OS != "android"', {
380 'notifier/object_id_invalidation_map_unittest.cc',
381 'notifier/registration_manager_unittest.cc',
382 'notifier/single_object_invalidation_set_unittest.cc',
383 'notifier/unacked_invalidation_set_unittest.cc',
390 # Unit tests for the 'sync_internal_api' target. This cannot be a static
391 # library because the unit test files have to be compiled directly
392 # into the executable, so we push the target files to the
393 # depending executable target via direct_dependent_settings.
395 'target_name': 'sync_internal_api_tests',
397 # We only want unit test executables to include this target.
398 'suppress_wildcard': 1,
400 '../base/base.gyp:base',
401 '../google_apis/google_apis.gyp:google_apis_test_support',
402 '../net/net.gyp:net',
403 '../net/net.gyp:net_test_support',
404 '../testing/gmock.gyp:gmock',
405 '../testing/gtest.gyp:gtest',
407 'test_support_sync_internal_api',
409 # Propagate all dependencies since the actual compilation
410 # happens in the dependents.
411 'export_dependent_settings': [
412 '../base/base.gyp:base',
413 '../net/net.gyp:net',
414 '../net/net.gyp:net_test_support',
415 '../testing/gmock.gyp:gmock',
416 '../testing/gtest.gyp:gtest',
418 'test_support_sync_internal_api',
420 'direct_dependent_settings': {
425 'internal_api/attachments/attachment_downloader_impl_unittest.cc',
426 'internal_api/attachments/attachment_uploader_impl_unittest.cc',
427 'internal_api/attachments/fake_attachment_downloader_unittest.cc',
428 'internal_api/attachments/fake_attachment_store_unittest.cc',
429 'internal_api/attachments/fake_attachment_uploader_unittest.cc',
430 'internal_api/debug_info_event_listener_unittest.cc',
431 'internal_api/http_bridge_unittest.cc',
432 'internal_api/js_mutation_event_observer_unittest.cc',
433 'internal_api/js_sync_encryption_handler_observer_unittest.cc',
434 'internal_api/js_sync_manager_observer_unittest.cc',
435 'internal_api/protocol_event_buffer_unittest.cc',
436 'internal_api/public/change_record_unittest.cc',
437 'internal_api/public/sessions/sync_session_snapshot_unittest.cc',
438 'internal_api/sync_backup_manager_unittest.cc',
439 'internal_api/sync_context_proxy_impl_unittest.cc',
440 'internal_api/sync_encryption_handler_impl_unittest.cc',
441 'internal_api/sync_manager_impl_unittest.cc',
442 'internal_api/sync_rollback_manager_base_unittest.cc',
443 'internal_api/sync_rollback_manager_unittest.cc',
444 'internal_api/syncapi_server_connection_manager_unittest.cc',
449 'internal_api/http_bridge_unittest.cc',
456 # Unit tests for the 'sync_api' target. This cannot be a static
457 # library because the unit test files have to be compiled directly
458 # into the executable, so we push the target files to the
459 # depending executable target via direct_dependent_settings.
461 'target_name': 'sync_api_tests',
463 # We only want unit test executables to include this target.
464 'suppress_wildcard': 1,
466 '../base/base.gyp:base',
467 '../testing/gtest.gyp:gtest',
469 'test_support_sync_internal_api',
471 # Propagate all dependencies since the actual compilation
472 # happens in the dependents.
473 'export_dependent_settings': [
474 '../base/base.gyp:base',
475 '../testing/gtest.gyp:gtest',
477 'test_support_sync_internal_api',
479 'direct_dependent_settings': {
484 'api/attachments/attachment_unittest.cc',
485 'api/attachments/attachment_id_unittest.cc',
486 'api/attachments/attachment_service_impl_unittest.cc',
487 'api/attachments/attachment_service_proxy_unittest.cc',
488 'api/sync_change_unittest.cc',
489 'api/sync_data_unittest.cc',
490 'api/sync_error_unittest.cc',
491 'api/sync_merge_result_unittest.cc',
496 # The unit test executable for sync tests.
498 'target_name': 'sync_unit_tests',
499 'type': '<(gtest_target_type)',
500 # Typed-parametrized tests generate exit-time destructors.
501 'variables': { 'enable_wexit_time_destructors': 0, },
506 '../base/base.gyp:run_all_unittests',
509 'sync_internal_api_tests',
510 'sync_notifier_tests',
513 # TODO(akalin): This is needed because histogram.cc uses
514 # leak_annotations.h, which pulls this in. Make 'base'
515 # propagate this dependency.
516 ['OS=="linux" and use_allocator!="none"', {
518 '../base/allocator/allocator.gyp:allocator',
521 ['OS == "android"', {
523 '../testing/android/native_test.gyp:native_test_native_code',
529 # Test support files for using the Test Accounts service.
531 'target_name': 'test_support_accounts_client',
532 'type': 'static_library',
533 'direct_dependent_settings': {
539 '../base/base.gyp:base',
540 '../net/net.gyp:net',
543 'test/accounts_client/test_accounts_client.cc',
544 'test/accounts_client/test_accounts_client.h',
545 'test/accounts_client/url_request_context_getter.cc',
546 'test/accounts_client/url_request_context_getter.h',
550 # The Sync end-to-end (and associated infrastructure) tests.
552 'target_name': 'sync_endtoend_tests',
553 'type': '<(gtest_target_type)',
555 '../base/base.gyp:run_all_unittests',
556 '../testing/gmock.gyp:gmock',
557 '../testing/gtest.gyp:gtest',
558 '../url/url.gyp:url_lib',
559 'test_support_accounts_client',
562 'test/accounts_client/test_accounts_client_unittest.cc',
570 # A tool that can be used to launch a python sync server instance.
572 'target_name': 'run_sync_testserver',
573 'type': 'executable',
575 '../base/base.gyp:base',
576 '../base/base.gyp:test_support_base',
577 '../net/net.gyp:net_test_support',
578 '../testing/gtest.gyp:gtest',
579 'test_support_sync_testserver',
582 'tools/testserver/run_sync_testserver.cc',
587 ['OS == "android"', {
590 'target_name': 'sync_javatests',
593 'java_in_dir': '../sync/android/javatests',
597 'sync_java_test_support',
598 '../base/base.gyp:base_java_test_support',
600 'includes': [ '../build/java.gypi' ],
603 'target_name': 'sync_java_test_support',
606 'package_name': 'sync_java_test_support',
607 'java_in_dir': '../sync/test/android/javatests',
612 'includes': [ '../build/java.gypi' ],
616 ['OS == "android"', {
619 'target_name': 'sync_unit_tests_apk',
625 'test_suite_name': 'sync_unit_tests',
627 'includes': [ '../build/apk_test.gypi' ],