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/mock_update_handler.cc',
44 'test/engine/mock_update_handler.h',
45 'test/engine/test_directory_setter_upper.cc',
46 'test/engine/test_directory_setter_upper.h',
47 'test/engine/test_id_factory.h',
48 'test/engine/test_syncable_utils.cc',
49 'test/engine/test_syncable_utils.h',
50 'test/fake_encryptor.cc',
51 'test/fake_encryptor.h',
52 'test/fake_sync_encryption_handler.cc',
53 'test/fake_sync_encryption_handler.h',
54 'test/null_directory_change_delegate.cc',
55 'test/null_directory_change_delegate.h',
56 'test/null_transaction_observer.cc',
57 'test/null_transaction_observer.h',
58 'test/sessions/test_scoped_session_event_listener.h',
59 'test/sessions/mock_debug_info_getter.h',
60 'test/sessions/mock_debug_info_getter.cc',
61 'test/test_directory_backing_store.cc',
62 'test/test_directory_backing_store.h',
63 'test/test_transaction_observer.cc',
64 'test/test_transaction_observer.h',
65 'util/test_unrecoverable_error_handler.cc',
66 'util/test_unrecoverable_error_handler.h',
70 # Test support files for the python sync test server.
72 'target_name': 'test_support_sync_testserver',
73 'type': 'static_library',
74 'variables': { 'enable_wexit_time_destructors': 1, },
79 '../base/base.gyp:base',
80 '../net/net.gyp:net_test_support',
81 # The sync test server uses Python modules generated by the sync protos.
82 '../third_party/protobuf/protobuf.gyp:py_proto',
85 'export_dependent_settings': [
86 '../base/base.gyp:base',
87 '../net/net.gyp:net_test_support',
90 'test/local_sync_test_server.cc',
91 'test/local_sync_test_server.h',
95 # Test support files for the fake sync server.
97 'target_name': 'test_support_sync_fake_server',
98 'type': 'static_library',
99 'variables': { 'enable_wexit_time_destructors': 1, },
104 '../base/base.gyp:base',
105 '../net/net.gyp:net',
106 '../testing/gtest.gyp:gtest',
107 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
110 'export_dependent_settings': [
114 'test/fake_server/bookmark_entity.cc',
115 'test/fake_server/bookmark_entity.h',
116 'test/fake_server/bookmark_entity_builder.cc',
117 'test/fake_server/bookmark_entity_builder.h',
118 'test/fake_server/entity_builder.cc',
119 'test/fake_server/entity_builder.h',
120 'test/fake_server/entity_builder_factory.cc',
121 'test/fake_server/entity_builder_factory.h',
122 'test/fake_server/fake_server.cc',
123 'test/fake_server/fake_server.h',
124 'test/fake_server/fake_server_entity.cc',
125 'test/fake_server/fake_server_entity.h',
126 'test/fake_server/fake_server_http_post_provider.cc',
127 'test/fake_server/fake_server_http_post_provider.h',
128 'test/fake_server/fake_server_network_resources.cc',
129 'test/fake_server/fake_server_network_resources.h',
130 'test/fake_server/fake_server_verifier.cc',
131 'test/fake_server/fake_server_verifier.h',
132 'test/fake_server/permanent_entity.cc',
133 'test/fake_server/permanent_entity.h',
134 'test/fake_server/tombstone_entity.cc',
135 'test/fake_server/tombstone_entity.h',
136 'test/fake_server/unique_client_entity.cc',
137 'test/fake_server/unique_client_entity.h',
141 # Test support files for the 'sync_notifier' target.
143 'target_name': 'test_support_sync_notifier',
144 'type': 'static_library',
152 '../testing/gmock.gyp:gmock',
153 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
156 'export_dependent_settings': [
157 '../testing/gmock.gyp:gmock',
158 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
162 'notifier/unacked_invalidation_set_test_util.cc',
163 'notifier/unacked_invalidation_set_test_util.h',
164 'internal_api/public/base/object_id_invalidation_map_test_util.h',
165 'internal_api/public/base/object_id_invalidation_map_test_util.cc',
169 # Test support files for the 'sync_internal_api' target.
171 'target_name': 'test_support_sync_internal_api',
172 'type': 'static_library',
173 'variables': { 'enable_wexit_time_destructors': 1, },
181 '../base/base.gyp:base',
182 '../testing/gtest.gyp:gtest',
184 'test_support_sync_core',
186 'export_dependent_settings': [
187 '../testing/gtest.gyp:gtest',
189 'test_support_sync_core',
192 'internal_api/public/base/invalidation_test_util.cc',
193 'internal_api/public/base/invalidation_test_util.h',
194 'internal_api/public/test/fake_sync_manager.h',
195 'internal_api/public/test/null_sync_core_proxy.h',
196 'internal_api/public/test/sync_manager_factory_for_profile_sync_test.h',
197 'internal_api/public/test/test_entry_factory.h',
198 'internal_api/public/test/test_internal_components_factory.h',
199 'internal_api/public/test/test_user_share.h',
200 'internal_api/test/fake_sync_manager.cc',
201 'internal_api/test/null_sync_core_proxy.cc',
202 'internal_api/test/sync_manager_factory_for_profile_sync_test.cc',
203 'internal_api/test/sync_manager_for_profile_sync_test.cc',
204 'internal_api/test/sync_manager_for_profile_sync_test.h',
205 'internal_api/test/test_entry_factory.cc',
206 'internal_api/test/test_internal_components_factory.cc',
207 'internal_api/test/test_user_share.cc',
211 # Test support files for the 'sync_api' target.
213 'target_name': 'test_support_sync_api',
214 'type': 'static_library',
222 '../testing/gmock.gyp:gmock',
225 'export_dependent_settings': [
226 '../testing/gmock.gyp:gmock',
230 'api/fake_syncable_service.cc',
231 'api/fake_syncable_service.h',
232 'api/fake_sync_change_processor.cc',
233 'api/fake_sync_change_processor.h',
234 'api/sync_change_processor_wrapper_for_test.cc',
235 'api/sync_change_processor_wrapper_for_test.h',
236 'api/sync_error_factory_mock.cc',
237 'api/sync_error_factory_mock.h',
241 # Unit tests for the 'sync_core' target. This cannot be a static
242 # library because the unit test files have to be compiled directly
243 # into the executable, so we push the target files to the
244 # depending executable target via direct_dependent_settings.
246 'target_name': 'sync_core_tests',
248 # We only want unit test executables to include this target.
249 'suppress_wildcard': 1,
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',
259 ['OS=="linux" and chromeos==1', {
260 # Required by get_session_name_unittest.cc on Chrome OS.
262 '../chromeos/chromeos.gyp:chromeos',
266 # Propagate all dependencies since the actual compilation
267 # happens in the dependents.
268 'export_dependent_settings': [
269 '../base/base.gyp:base',
270 '../sql/sql.gyp:sql',
271 '../testing/gmock.gyp:gmock',
272 '../testing/gtest.gyp:gtest',
274 'test_support_sync_core',
276 'direct_dependent_settings': {
281 'internal_api/public/base/cancelation_signal_unittest.cc',
282 'internal_api/public/base/enum_set_unittest.cc',
283 'internal_api/public/base/node_ordinal_unittest.cc',
284 'internal_api/public/base/ordinal_unittest.cc',
285 'internal_api/public/base/unique_position_unittest.cc',
286 'internal_api/public/engine/model_safe_worker_unittest.cc',
287 'internal_api/public/util/immutable_unittest.cc',
288 'internal_api/public/util/weak_handle_unittest.cc',
289 'engine/apply_control_data_updates_unittest.cc',
290 'engine/backoff_delay_provider_unittest.cc',
291 'engine/directory_commit_contribution_unittest.cc',
292 'engine/directory_update_handler_unittest.cc',
293 'engine/get_updates_processor_unittest.cc',
294 'engine/model_thread_sync_entity_unittest.cc',
295 'engine/non_blocking_type_processor_core_unittest.cc',
296 'engine/non_blocking_type_processor_unittest.cc',
297 'engine/sync_scheduler_unittest.cc',
298 'engine/sync_thread_sync_entity_unittest.cc',
299 'engine/syncer_proto_util_unittest.cc',
300 'engine/syncer_unittest.cc',
301 'engine/syncer_util_unittest.cc',
302 'js/js_event_details_unittest.cc',
303 'js/sync_js_controller_unittest.cc',
304 'protocol/proto_enum_conversions_unittest.cc',
305 'protocol/proto_value_conversions_unittest.cc',
306 'sessions/model_type_registry_unittest.cc',
307 'sessions/nudge_tracker_unittest.cc',
308 'sessions/status_controller_unittest.cc',
309 'syncable/directory_unittest.cc',
310 'syncable/directory_unittest.h',
311 'syncable/directory_backing_store_unittest.cc',
312 'syncable/entry_kernel_unittest.cc',
313 'syncable/model_type_unittest.cc',
314 'syncable/nigori_util_unittest.cc',
315 'syncable/parent_child_index_unittest.cc',
316 'syncable/syncable_enum_conversions_unittest.cc',
317 'syncable/syncable_id_unittest.cc',
318 'syncable/syncable_unittest.cc',
319 'syncable/syncable_util_unittest.cc',
320 'util/cryptographer_unittest.cc',
321 'util/data_type_histogram_unittest.cc',
322 'util/get_session_name_unittest.cc',
323 'util/nigori_unittest.cc',
324 'util/protobuf_unittest.cc',
329 # Unit tests for the 'sync_notifier' target. This cannot be a static
330 # library because the unit test files have to be compiled directly
331 # into the executable, so we push the target files to the
332 # depending executable target via direct_dependent_settings.
334 'target_name': 'sync_notifier_tests',
336 # We only want unit test executables to include this target.
337 'suppress_wildcard': 1,
339 '../base/base.gyp:base',
340 '../google_apis/google_apis.gyp:google_apis',
341 '../jingle/jingle.gyp:notifier_test_util',
342 '../net/net.gyp:net_test_support',
343 '../testing/gmock.gyp:gmock',
344 '../testing/gtest.gyp:gtest',
345 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
346 '../third_party/libjingle/libjingle.gyp:libjingle',
348 'test_support_sync_notifier',
350 # Propagate all dependencies since the actual compilation
351 # happens in the dependents.
352 'export_dependent_settings': [
353 '../base/base.gyp:base',
354 '../google_apis/google_apis.gyp:google_apis',
355 '../jingle/jingle.gyp:notifier_test_util',
356 '../net/net.gyp:net_test_support',
357 '../testing/gmock.gyp:gmock',
358 '../testing/gtest.gyp:gtest',
359 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
360 '../third_party/libjingle/libjingle.gyp:libjingle',
362 'test_support_sync_notifier',
364 'direct_dependent_settings': {
369 ['OS != "android"', {
371 'notifier/object_id_invalidation_map_unittest.cc',
372 'notifier/registration_manager_unittest.cc',
373 'notifier/single_object_invalidation_set_unittest.cc',
374 'notifier/unacked_invalidation_set_unittest.cc',
381 # Unit tests for the 'sync_internal_api' target. This cannot be a static
382 # library because the unit test files have to be compiled directly
383 # into the executable, so we push the target files to the
384 # depending executable target via direct_dependent_settings.
386 'target_name': 'sync_internal_api_tests',
388 # We only want unit test executables to include this target.
389 'suppress_wildcard': 1,
391 '../base/base.gyp:base',
392 '../net/net.gyp:net',
393 '../net/net.gyp:net_test_support',
394 '../testing/gmock.gyp:gmock',
395 '../testing/gtest.gyp:gtest',
397 'test_support_sync_internal_api',
399 # Propagate all dependencies since the actual compilation
400 # happens in the dependents.
401 'export_dependent_settings': [
402 '../base/base.gyp:base',
403 '../net/net.gyp:net',
404 '../net/net.gyp:net_test_support',
405 '../testing/gmock.gyp:gmock',
406 '../testing/gtest.gyp:gtest',
408 'test_support_sync_internal_api',
410 'direct_dependent_settings': {
415 'internal_api/attachments/attachment_downloader_impl_unittest.cc',
416 'internal_api/attachments/attachment_uploader_impl_unittest.cc',
417 'internal_api/attachments/fake_attachment_downloader_unittest.cc',
418 'internal_api/attachments/fake_attachment_store_unittest.cc',
419 'internal_api/attachments/fake_attachment_uploader_unittest.cc',
420 'internal_api/debug_info_event_listener_unittest.cc',
421 'internal_api/http_bridge_unittest.cc',
422 'internal_api/js_mutation_event_observer_unittest.cc',
423 'internal_api/js_sync_encryption_handler_observer_unittest.cc',
424 'internal_api/js_sync_manager_observer_unittest.cc',
425 'internal_api/protocol_event_buffer_unittest.cc',
426 'internal_api/public/change_record_unittest.cc',
427 'internal_api/public/sessions/sync_session_snapshot_unittest.cc',
428 'internal_api/sync_backup_manager_unittest.cc',
429 'internal_api/sync_core_proxy_impl_unittest.cc',
430 'internal_api/sync_encryption_handler_impl_unittest.cc',
431 'internal_api/sync_manager_impl_unittest.cc',
432 'internal_api/sync_rollback_manager_base_unittest.cc',
433 'internal_api/sync_rollback_manager_unittest.cc',
434 'internal_api/syncapi_server_connection_manager_unittest.cc',
439 'internal_api/http_bridge_unittest.cc',
446 # Unit tests for the 'sync_api' target. This cannot be a static
447 # library because the unit test files have to be compiled directly
448 # into the executable, so we push the target files to the
449 # depending executable target via direct_dependent_settings.
451 'target_name': 'sync_api_tests',
453 # We only want unit test executables to include this target.
454 'suppress_wildcard': 1,
456 '../base/base.gyp:base',
457 '../testing/gtest.gyp:gtest',
459 'test_support_sync_internal_api',
461 # Propagate all dependencies since the actual compilation
462 # happens in the dependents.
463 'export_dependent_settings': [
464 '../base/base.gyp:base',
465 '../testing/gtest.gyp:gtest',
467 'test_support_sync_internal_api',
469 'direct_dependent_settings': {
474 'api/attachments/attachment_unittest.cc',
475 'api/attachments/attachment_id_unittest.cc',
476 'api/attachments/attachment_service_impl_unittest.cc',
477 'api/attachments/attachment_service_proxy_unittest.cc',
478 'api/sync_change_unittest.cc',
479 'api/sync_data_unittest.cc',
480 'api/sync_error_unittest.cc',
481 'api/sync_merge_result_unittest.cc',
486 # The unit test executable for sync tests.
488 'target_name': 'sync_unit_tests',
489 'type': '<(gtest_target_type)',
490 # Typed-parametrized tests generate exit-time destructors.
491 'variables': { 'enable_wexit_time_destructors': 0, },
496 '../base/base.gyp:run_all_unittests',
499 'sync_internal_api_tests',
500 'sync_notifier_tests',
503 # TODO(akalin): This is needed because histogram.cc uses
504 # leak_annotations.h, which pulls this in. Make 'base'
505 # propagate this dependency.
506 ['OS=="linux" and use_allocator!="none"', {
508 '../base/allocator/allocator.gyp:allocator',
511 ['OS == "android"', {
513 '../testing/android/native_test.gyp:native_test_native_code',
519 # Test support files for using the Test Accounts service.
521 'target_name': 'test_support_accounts_client',
522 'type': 'static_library',
523 'direct_dependent_settings': {
529 '../base/base.gyp:base',
530 '../net/net.gyp:net',
533 'test/accounts_client/test_accounts_client.cc',
534 'test/accounts_client/test_accounts_client.h',
535 'test/accounts_client/url_request_context_getter.cc',
536 'test/accounts_client/url_request_context_getter.h',
540 # The Sync end-to-end (and associated infrastructure) tests.
542 'target_name': 'sync_endtoend_tests',
543 'type': '<(gtest_target_type)',
545 '../base/base.gyp:run_all_unittests',
546 '../testing/gmock.gyp:gmock',
547 '../testing/gtest.gyp:gtest',
548 '../url/url.gyp:url_lib',
549 'test_support_accounts_client',
552 'test/accounts_client/test_accounts_client_unittest.cc',
560 # A tool that can be used to launch a python sync server instance.
562 'target_name': 'run_sync_testserver',
563 'type': 'executable',
565 '../base/base.gyp:base',
566 '../base/base.gyp:test_support_base',
567 '../net/net.gyp:net_test_support',
568 '../testing/gtest.gyp:gtest',
569 'test_support_sync_testserver',
572 'tools/testserver/run_sync_testserver.cc',
577 ['OS == "android"', {
580 'target_name': 'sync_javatests',
583 'java_in_dir': '../sync/android/javatests',
587 'sync_java_test_support',
588 '../base/base.gyp:base_java_test_support',
590 'includes': [ '../build/java.gypi' ],
593 'target_name': 'sync_java_test_support',
596 'package_name': 'sync_java_test_support',
597 'java_in_dir': '../sync/test/android/javatests',
602 'includes': [ '../build/java.gypi' ],
606 ['OS == "android"', {
609 'target_name': 'sync_unit_tests_apk',
615 'test_suite_name': 'sync_unit_tests',
617 'includes': [ '../build/apk_test.gypi' ],