Disable discard_framebuffer on ARM Mali-400 on Linux
[chromium-blink-merge.git] / sync / sync_tests.gypi
blob69804e1133b5cb4169b12e2f028a5af411bb6637
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.
6   'targets': [
7     # Test support files for the 'sync_core' target.
8     # GN version: //sync:test_support_sync_core
9     {
10       'target_name': 'test_support_sync_core',
11       'type': 'static_library',
12       'variables': { 'enable_wexit_time_destructors': 1, },
13       'include_dirs': [
14         '..',
15       ],
16       'defines': [
17         'SYNC_TEST'
18       ],
19       'dependencies': [
20         '../base/base.gyp:base',
21         '../testing/gmock.gyp:gmock',
22         '../testing/gtest.gyp:gtest',
23         'sync',
24       ],
25       'export_dependent_settings': [
26         '../testing/gmock.gyp:gmock',
27         '../testing/gtest.gyp:gtest',
28         'sync',
29       ],
30       'sources': [
31         'internal_api/public/base/model_type_test_util.cc',
32         'internal_api/public/base/model_type_test_util.h',
33         'js/js_test_util.cc',
34         'js/js_test_util.h',
35         'sessions/test_util.cc',
36         'sessions/test_util.h',
37         'test/callback_counter.h',
38         "test/directory_backing_store_corruption_testing.cc",
39         "test/directory_backing_store_corruption_testing.h",
40         'test/engine/fake_model_worker.cc',
41         'test/engine/fake_model_worker.h',
42         'test/engine/fake_sync_scheduler.cc',
43         'test/engine/fake_sync_scheduler.h',
44         'test/engine/injectable_sync_context_proxy.cc',
45         'test/engine/injectable_sync_context_proxy.h',
46         'test/engine/mock_connection_manager.cc',
47         'test/engine/mock_connection_manager.h',
48         'test/engine/mock_model_type_sync_proxy.cc',
49         'test/engine/mock_model_type_sync_proxy.h',
50         'test/engine/mock_model_type_sync_worker.cc',
51         'test/engine/mock_model_type_sync_worker.h',
52         'test/engine/mock_nudge_handler.cc',
53         'test/engine/mock_nudge_handler.h',
54         'test/engine/mock_update_handler.cc',
55         'test/engine/mock_update_handler.h',
56         'test/engine/single_type_mock_server.cc',
57         'test/engine/single_type_mock_server.h',
58         'test/engine/test_directory_setter_upper.cc',
59         'test/engine/test_directory_setter_upper.h',
60         'test/engine/test_id_factory.h',
61         'test/engine/test_syncable_utils.cc',
62         'test/engine/test_syncable_utils.h',
63         'test/fake_encryptor.cc',
64         'test/fake_encryptor.h',
65         'test/fake_sync_encryption_handler.cc',
66         'test/fake_sync_encryption_handler.h',
67         'test/mock_invalidation.cc',
68         'test/mock_invalidation.h',
69         'test/mock_invalidation_tracker.cc',
70         'test/mock_invalidation_tracker.h',
71         'test/null_directory_change_delegate.cc',
72         'test/null_directory_change_delegate.h',
73         'test/null_transaction_observer.cc',
74         'test/null_transaction_observer.h',
75         'test/sessions/mock_debug_info_getter.cc',
76         'test/sessions/mock_debug_info_getter.h',
77         'test/sessions/test_scoped_session_event_listener.h',
78         'test/test_directory_backing_store.cc',
79         'test/test_directory_backing_store.h',
80         'test/test_transaction_observer.cc',
81         'test/test_transaction_observer.h',
82         'test/trackable_mock_invalidation.cc',
83         'test/trackable_mock_invalidation.h',
84         'util/mock_unrecoverable_error_handler.cc',
85         'util/mock_unrecoverable_error_handler.h',
86         'util/test_unrecoverable_error_handler.cc',
87         'util/test_unrecoverable_error_handler.h',
88       ],
89     },
91     # Test support files for the python sync test server.
92     # GN version: //sync:test_support_sync_testserver
93     {
94       'target_name': 'test_support_sync_testserver',
95       'type': 'static_library',
96       'variables': { 'enable_wexit_time_destructors': 1, },
97       'include_dirs': [
98         '..',
99       ],
100       'dependencies': [
101         '../base/base.gyp:base',
102         '../net/net.gyp:net_test_support',
103         # The sync test server uses Python modules generated by the sync protos.
104         '../third_party/protobuf/protobuf.gyp:py_proto',
105         'sync',
106       ],
107       'export_dependent_settings': [
108         '../base/base.gyp:base',
109         '../net/net.gyp:net_test_support',
110       ],
111       'sources': [
112         'test/local_sync_test_server.cc',
113         'test/local_sync_test_server.h',
114       ],
115     },
117     # Test support files for the fake sync server.
118     # GN version: //sync:test_support_sync_fake_server
119     {
120       'target_name': 'test_support_sync_fake_server',
121       'type': 'static_library',
122       'variables': { 'enable_wexit_time_destructors': 1, },
123       'include_dirs': [
124         '..',
125       ],
126       'dependencies': [
127         '../base/base.gyp:base',
128         '../net/net.gyp:net',
129         '../testing/gtest.gyp:gtest',
130         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
131         'sync',
132       ],
133       'export_dependent_settings': [
134         'sync',
135       ],
136       'sources': [
137         'test/fake_server/bookmark_entity.cc',
138         'test/fake_server/bookmark_entity.h',
139         'test/fake_server/bookmark_entity_builder.cc',
140         'test/fake_server/bookmark_entity_builder.h',
141         'test/fake_server/entity_builder.cc',
142         'test/fake_server/entity_builder.h',
143         'test/fake_server/entity_builder_factory.cc',
144         'test/fake_server/entity_builder_factory.h',
145         'test/fake_server/fake_server.cc',
146         'test/fake_server/fake_server.h',
147         'test/fake_server/fake_server_entity.cc',
148         'test/fake_server/fake_server_entity.h',
149         'test/fake_server/fake_server_http_post_provider.cc',
150         'test/fake_server/fake_server_http_post_provider.h',
151         'test/fake_server/fake_server_network_resources.cc',
152         'test/fake_server/fake_server_network_resources.h',
153         'test/fake_server/fake_server_verifier.cc',
154         'test/fake_server/fake_server_verifier.h',
155         'test/fake_server/permanent_entity.cc',
156         'test/fake_server/permanent_entity.h',
157         'test/fake_server/sessions_hierarchy.cc',
158         'test/fake_server/sessions_hierarchy.h',
159         'test/fake_server/tombstone_entity.cc',
160         'test/fake_server/tombstone_entity.h',
161         'test/fake_server/unique_client_entity.cc',
162         'test/fake_server/unique_client_entity.h',
163       ],
164     },
166     # Test support files for the 'sync_internal_api' target.
167     # GN version: //sync:test_support_sync_internal_api
168     {
169       'target_name': 'test_support_sync_internal_api',
170       'type': 'static_library',
171       'variables': { 'enable_wexit_time_destructors': 1, },
172       'include_dirs': [
173         '..',
174       ],
175       'defines': [
176         'SYNC_TEST'
177       ],
178       'dependencies': [
179         '../base/base.gyp:base',
180         '../testing/gtest.gyp:gtest',
181         'sync',
182         'test_support_sync_core',
183       ],
184       'export_dependent_settings': [
185         '../testing/gtest.gyp:gtest',
186         'sync',
187         'test_support_sync_core',
188       ],
189       'sources': [
190         'internal_api/public/test/fake_sync_manager.h',
191         'internal_api/public/test/null_sync_context_proxy.h',
192         'internal_api/public/test/sync_manager_factory_for_profile_sync_test.h',
193         'internal_api/public/test/test_entry_factory.h',
194         'internal_api/public/test/test_internal_components_factory.h',
195         'internal_api/public/test/test_user_share.h',
196         'internal_api/test/fake_sync_manager.cc',
197         'internal_api/test/null_sync_context_proxy.cc',
198         'internal_api/test/sync_manager_factory_for_profile_sync_test.cc',
199         'internal_api/test/sync_manager_for_profile_sync_test.cc',
200         'internal_api/test/sync_manager_for_profile_sync_test.h',
201         'internal_api/test/test_entry_factory.cc',
202         'internal_api/test/test_internal_components_factory.cc',
203         'internal_api/test/test_user_share.cc',
204       ],
205     },
207     # Test support files for the 'sync_api' target.
208     # GN version: //sync:test_support_sync_api
209     {
210       'target_name': 'test_support_sync_api',
211       'type': 'static_library',
212       'include_dirs': [
213         '..',
214       ],
215       'defines': [
216         'SYNC_TEST'
217       ],
218       'dependencies': [
219         '../testing/gmock.gyp:gmock',
220         'sync',
221       ],
222       'export_dependent_settings': [
223         '../testing/gmock.gyp:gmock',
224         'sync',
225       ],
226       'sources': [
227         'api/fake_sync_change_processor.cc',
228         'api/fake_sync_change_processor.h',
229         'api/fake_syncable_service.cc',
230         'api/fake_syncable_service.h',
231         'api/sync_change_processor_wrapper_for_test.cc',
232         'api/sync_change_processor_wrapper_for_test.h',
233         'api/sync_error_factory_mock.cc',
234         'api/sync_error_factory_mock.h',
235       ],
236     },
238     # The unit test executable for sync tests.
239     # GN version: //sync:sync_unit_tests
240     {
241       'target_name': 'sync_unit_tests',
242       'type': '<(gtest_target_type)',
243       # Typed-parametrized tests generate exit-time destructors.
244       'variables': { 'enable_wexit_time_destructors': 0, },
245       'defines': [
246         'SYNC_TEST',
247       ],
248       'dependencies': [
249         '../base/base.gyp:base',
250         '../base/base.gyp:run_all_unittests',
251         '../google_apis/google_apis.gyp:google_apis',
252         '../google_apis/google_apis.gyp:google_apis_test_support',
253         '../net/net.gyp:net',
254         '../net/net.gyp:net_test_support',
255         '../sql/sql.gyp:sql',
256         '../sql/sql.gyp:test_support_sql',
257         '../testing/gmock.gyp:gmock',
258         '../testing/gtest.gyp:gtest',
259         '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
260         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
261         'sync',
262         'test_support_sync_core',
263         'test_support_sync_internal_api',
264       ],
265       'include_dirs': [
266         '..',
267       ],
268       'sources': [
269         'api/attachments/attachment_id_unittest.cc',
270         'api/attachments/attachment_metadata_unittest.cc',
271         'api/attachments/attachment_unittest.cc',
272         'api/sync_change_unittest.cc',
273         'api/sync_data_unittest.cc',
274         'api/sync_error_unittest.cc',
275         'api/sync_merge_result_unittest.cc',
276         'engine/apply_control_data_updates_unittest.cc',
277         'engine/backoff_delay_provider_unittest.cc',
278         'engine/directory_commit_contribution_unittest.cc',
279         'engine/directory_update_handler_unittest.cc',
280         'engine/entity_tracker_unittest.cc',
281         'engine/get_updates_processor_unittest.cc',
282         'engine/model_type_entity_unittest.cc',
283         'engine/model_type_sync_proxy_impl_unittest.cc',
284         'engine/model_type_sync_worker_impl_unittest.cc',
285         'engine/sync_scheduler_unittest.cc',
286         'engine/syncer_proto_util_unittest.cc',
287         'engine/syncer_unittest.cc',
288         'engine/syncer_util_unittest.cc',
289         'internal_api/attachments/attachment_downloader_impl_unittest.cc',
290         'internal_api/attachments/attachment_service_impl_unittest.cc',
291         'internal_api/attachments/attachment_service_proxy_unittest.cc',
292         'internal_api/attachments/attachment_store_frontend_unittest.cc',
293         'internal_api/attachments/attachment_store_test_template.h',
294         'internal_api/attachments/attachment_uploader_impl_unittest.cc',
295         'internal_api/attachments/fake_attachment_downloader_unittest.cc',
296         'internal_api/attachments/fake_attachment_uploader_unittest.cc',
297         'internal_api/attachments/in_memory_attachment_store_unittest.cc',
298         'internal_api/attachments/on_disk_attachment_store_unittest.cc',
299         'internal_api/attachments/task_queue_unittest.cc',
300         'internal_api/debug_info_event_listener_unittest.cc',
301         'internal_api/http_bridge_unittest.cc',
302         'internal_api/js_mutation_event_observer_unittest.cc',
303         'internal_api/js_sync_encryption_handler_observer_unittest.cc',
304         'internal_api/js_sync_manager_observer_unittest.cc',
305         'internal_api/protocol_event_buffer_unittest.cc',
306         'internal_api/public/base/attachment_id_proto_unittest.cc',
307         'internal_api/public/base/cancelation_signal_unittest.cc',
308         'internal_api/public/base/enum_set_unittest.cc',
309         'internal_api/public/base/node_ordinal_unittest.cc',
310         'internal_api/public/base/ordinal_unittest.cc',
311         'internal_api/public/base/unique_position_unittest.cc',
312         'internal_api/public/change_record_unittest.cc',
313         'internal_api/public/engine/model_safe_worker_unittest.cc',
314         'internal_api/public/sessions/sync_session_snapshot_unittest.cc',
315         'internal_api/public/util/immutable_unittest.cc',
316         'internal_api/public/util/weak_handle_unittest.cc',
317         'internal_api/sync_backup_manager_unittest.cc',
318         'internal_api/sync_context_proxy_impl_unittest.cc',
319         'internal_api/sync_encryption_handler_impl_unittest.cc',
320         'internal_api/sync_manager_impl_unittest.cc',
321         'internal_api/sync_rollback_manager_base_unittest.cc',
322         'internal_api/sync_rollback_manager_unittest.cc',
323         'internal_api/syncapi_server_connection_manager_unittest.cc',
324         'js/js_event_details_unittest.cc',
325         'js/sync_js_controller_unittest.cc',
326         'protocol/proto_enum_conversions_unittest.cc',
327         'protocol/proto_value_conversions_unittest.cc',
328         'sessions/model_type_registry_unittest.cc',
329         'sessions/nudge_tracker_unittest.cc',
330         'sessions/status_controller_unittest.cc',
331         'syncable/deferred_on_disk_directory_backing_store_unittest.cc',
332         'syncable/directory_backing_store_unittest.cc',
333         'syncable/directory_unittest.cc',
334         'syncable/directory_unittest.h',
335         'syncable/entry_kernel_unittest.cc',
336         'syncable/model_type_unittest.cc',
337         'syncable/nigori_util_unittest.cc',
338         'syncable/parent_child_index_unittest.cc',
339         'syncable/syncable_enum_conversions_unittest.cc',
340         'syncable/syncable_id_unittest.cc',
341         'syncable/syncable_unittest.cc',
342         'syncable/syncable_util_unittest.cc',
343         'util/cryptographer_unittest.cc',
344         'util/data_type_histogram_unittest.cc',
345         'util/get_session_name_unittest.cc',
346         'util/nigori_unittest.cc',
347         'util/protobuf_unittest.cc',
348       ],
349       'conditions': [
350         # TODO(akalin): This is needed because histogram.cc uses
351         # leak_annotations.h, which pulls this in.  Make 'base'
352         # propagate this dependency.
353         ['OS=="linux" and use_allocator!="none"', {
354           'dependencies': [
355             '../base/allocator/allocator.gyp:allocator',
356           ],
357         }],
358         ['OS == "android"', {
359           'dependencies': [
360             '../testing/android/native_test.gyp:native_test_native_code',
361           ],
362         }],
363         ['OS=="linux" and chromeos==1', {
364           # Required by get_session_name_unittest.cc on Chrome OS.
365           'dependencies': [
366             '../chromeos/chromeos.gyp:chromeos',
367           ],
368         }],
369         ['OS == "ios"', {
370           'sources!': [
371             'internal_api/http_bridge_unittest.cc',
372           ],
373         }],
374       ],
375     },
377     # Test support files for using the Test Accounts service.
378     # GN version: //sync:test_support_accounts_client
379     {
380       'target_name': 'test_support_accounts_client',
381       'type': 'static_library',
382       'direct_dependent_settings': {
383         'include_dirs': [
384           '..',
385         ],
386       },
387       'dependencies': [
388         '../base/base.gyp:base',
389         '../net/net.gyp:net',
390       ],
391       'sources': [
392         'test/accounts_client/test_accounts_client.cc',
393         'test/accounts_client/test_accounts_client.h',
394         'test/accounts_client/url_request_context_getter.cc',
395         'test/accounts_client/url_request_context_getter.h',
396       ],
397     },
399     # The Sync end-to-end (and associated infrastructure) tests.
400     # GN version: //sync:sync_endtoend_tests
401     {
402       'target_name': 'sync_endtoend_tests',
403       'type': '<(gtest_target_type)',
404       'dependencies': [
405         '../base/base.gyp:run_all_unittests',
406         '../testing/gmock.gyp:gmock',
407         '../testing/gtest.gyp:gtest',
408         '../url/url.gyp:url_lib',
409         'test_support_accounts_client',
410       ],
411       'sources': [
412         'test/accounts_client/test_accounts_client_unittest.cc',
413       ],
414     },
416   ],
417   'conditions': [
418     ['OS != "ios"', {
419       'targets': [
420         # A tool that can be used to launch a python sync server instance.
421         {
422           'target_name': 'run_sync_testserver',
423           'type': 'executable',
424           'dependencies': [
425             '../base/base.gyp:base',
426             '../base/base.gyp:test_support_base',
427             '../net/net.gyp:net_test_support',
428             '../testing/gtest.gyp:gtest',
429             'test_support_sync_testserver',
430           ],
431           'sources': [
432             'tools/testserver/run_sync_testserver.cc',
433           ],
434         },
435       ],
436     }],
437     ['OS == "android"', {
438       'targets': [
439         {
440           # GN: //sync/android:sync_javatests
441           'target_name': 'sync_javatests',
442           'type': 'none',
443           'variables': {
444             'java_in_dir': '../sync/android/javatests',
445           },
446           'dependencies': [
447             'sync_java',
448             'sync_java_test_support',
449             '../base/base.gyp:base_java_test_support',
450           ],
451           'includes': [ '../build/java.gypi' ],
452         },
453         {
454           # GN: //sync:sync_java_test_support
455           'target_name': 'sync_java_test_support',
456           'type': 'none',
457           'variables': {
458             'java_in_dir': '../sync/test/android/javatests',
459           },
460           'dependencies': [
461             'sync_java',
462           ],
463           'includes': [ '../build/java.gypi' ],
464         },
465         {
466           # GN: //sync:sync_fake_server_jni_headers
467           'target_name': 'sync_fake_server_jni_headers',
468           'type': 'none',
469           'sources': [
470             '../chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/FakeServerHelper.java',
471           ],
472           'variables': {
473             'jni_gen_package': 'sync/test/fake_server',
474             'jni_generator_ptr_type': 'long',
475           },
476           'includes': [ '../build/jni_generator.gypi' ],
477         },
478         {
479           # TODO(pvalenzuela): Create GN version of this target.
480           # http://crbug.com/475612
481           'target_name': 'test_support_sync_proto_java',
482           'type': 'none',
483           'variables': {
484             'proto_in_dir': '<(INTERMEDIATE_DIR)/sync_protos',
485             # Set this variable so that sync_proto_source_paths refers to the
486             # temporary proto definitions created here.
487             'sync_proto_sources_dir': '<(INTERMEDIATE_DIR)/sync_protos',
488           },
489           'actions': [
490             {
491               'action_name': 'run_script',
492               'inputs': [
493                 'protocol/prepare_protos_for_java_tests.py',
494                 # Use the original list of proto files (defined in sync.gyp).
495                 '<@(sync_proto_sources)',
496               ],
497               'outputs': [
498                 '<@(sync_proto_source_paths)',
499               ],
500               'action': [
501                 'python',
502                 'protocol/prepare_protos_for_java_tests.py',
503                 '--output_dir',
504                 '<(INTERMEDIATE_DIR)/sync_protos',
505                 # Use the original list of proto files (defined in sync.gyp).
506                 '<@(sync_proto_sources)'
507               ],
508             },
509           ],
510           'sources': [
511             '<@(sync_proto_source_paths)',
512           ],
513           'includes': ['protocol/protocol.gypi', '../build/protoc_java.gypi'],
514         },
515         {
516           # GN: //sync:test_support_sync_fake_server_android
517           'target_name': 'test_support_sync_fake_server_android',
518           'type': 'static_library',
519           'dependencies': [
520             'sync_fake_server_jni_headers',
521             'test_support_sync_fake_server',
522             '../testing/gtest.gyp:gtest',
523             '../base/base.gyp:base',
524           ],
525           'export_dependent_settings': [
526             '../testing/gtest.gyp:gtest',
527           ],
528           'sources': [
529             'test/fake_server/android/fake_server_helper_android.cc',
530             'test/fake_server/android/fake_server_helper_android.h',
531           ],
532         },
533         {
534           # GN: //sync:sync_unit_tests_apk
535           'target_name': 'sync_unit_tests_apk',
536           'type': 'none',
537           'dependencies': [
538             'sync_unit_tests',
539           ],
540           'variables': {
541             'test_suite_name': 'sync_unit_tests',
542           },
543           'includes': [ '../build/apk_test.gypi' ],
544         },
545       ],
546     }],
547   ],