Add renderbuffer BGRA8 format extension and support in cmd buffer for desktop GL...
[chromium-blink-merge.git] / sync / sync_tests.gypi
blob535042fcecbdaa7ffa08ee639c0929647b8065e2
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     {
9       'target_name': 'test_support_sync_core',
10       'type': 'static_library',
11       'variables': { 'enable_wexit_time_destructors': 1, },
12       'include_dirs': [
13         '..',
14       ],
15       'defines': [
16         'SYNC_TEST'
17       ],
18       'dependencies': [
19         '../base/base.gyp:base',
20         '../testing/gmock.gyp:gmock',
21         '../testing/gtest.gyp:gtest',
22         'sync',
23       ],
24       'export_dependent_settings': [
25         '../testing/gmock.gyp:gmock',
26         '../testing/gtest.gyp:gtest',
27         'sync',
28       ],
29       'sources': [
30         'internal_api/public/base/model_type_test_util.cc',
31         'internal_api/public/base/model_type_test_util.h',
32         'js/js_test_util.cc',
33         'js/js_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/syncer_command_test.cc',
44         'test/engine/syncer_command_test.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/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',
65       ],
66     },
68     # Test support files for the python sync test server.
69     {
70       'target_name': 'test_support_sync_testserver',
71       'type': 'static_library',
72       'variables': { 'enable_wexit_time_destructors': 1, },
73       'include_dirs': [
74         '..',
75       ],
76       'dependencies': [
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',
81         'sync',
82       ],
83       'export_dependent_settings': [
84         '../base/base.gyp:base',
85         '../net/net.gyp:net_test_support',
86       ],
87       'sources': [
88         'test/local_sync_test_server.cc',
89         'test/local_sync_test_server.h',
90       ],
91     },
93     # Test support files for the 'sync_notifier' target.
94     {
95       'target_name': 'test_support_sync_notifier',
96       'type': 'static_library',
97       'include_dirs': [
98         '..',
99       ],
100       'defines': [
101         'SYNC_TEST'
102       ],
103       'dependencies': [
104         '../testing/gmock.gyp:gmock',
105         '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
106         'sync',
107       ],
108       'export_dependent_settings': [
109         '../testing/gmock.gyp:gmock',
110         '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_proto_cpp',
111         'sync',
112       ],
113       'sources': [
114         'notifier/fake_invalidation_handler.cc',
115         'notifier/fake_invalidation_handler.h',
116         'notifier/fake_invalidation_state_tracker.cc',
117         'notifier/fake_invalidation_state_tracker.h',
118         'notifier/fake_invalidator.cc',
119         'notifier/fake_invalidator.h',
120         'notifier/invalidator_test_template.cc',
121         'notifier/invalidator_test_template.h',
122       ],
123     },
125     # Test support files for the 'sync_internal_api' target.
126     {
127       'target_name': 'test_support_sync_internal_api',
128       'type': 'static_library',
129       'variables': { 'enable_wexit_time_destructors': 1, },
130       'include_dirs': [
131         '..',
132       ],
133       'defines': [
134         'SYNC_TEST'
135       ],
136       'dependencies': [
137         '../base/base.gyp:base',
138         '../testing/gtest.gyp:gtest',
139         'sync',
140         'test_support_sync_core',
141       ],
142       'export_dependent_settings': [
143         '../testing/gtest.gyp:gtest',
144         'sync',
145         'test_support_sync_core',
146       ],
147       'sources': [
148         'internal_api/public/base/invalidation_test_util.cc',
149         'internal_api/public/base/invalidation_test_util.h',
150         'internal_api/public/base/object_id_invalidation_map_test_util.cc',
151         'internal_api/public/base/object_id_invalidation_map_test_util.h',
152         'internal_api/public/test/fake_sync_manager.h',
153         'internal_api/public/test/test_entry_factory.h',
154         'internal_api/public/test/test_internal_components_factory.h',
155         'internal_api/public/test/test_user_share.h',
156         'internal_api/test/fake_sync_manager.cc',
157         'internal_api/test/test_entry_factory.cc',
158         'internal_api/test/test_internal_components_factory.cc',
159         'internal_api/test/test_user_share.cc',
160       ],
161     },
163     # Test support files for the 'sync_api' target.
164     {
165       'target_name': 'test_support_sync_api',
166       'type': 'static_library',
167       'include_dirs': [
168         '..',
169       ],
170       'defines': [
171         'SYNC_TEST'
172       ],
173       'dependencies': [
174         '../testing/gmock.gyp:gmock',
175         'sync',
176       ],
177       'export_dependent_settings': [
178         '../testing/gmock.gyp:gmock',
179         'sync',
180       ],
181       'sources': [
182         'api/fake_syncable_service.cc',
183         'api/fake_syncable_service.h',
184         'api/sync_error_factory_mock.cc',
185         'api/sync_error_factory_mock.h',
186       ],
187     },
189     # Unit tests for the 'sync_core' target.  This cannot be a static
190     # library because the unit test files have to be compiled directly
191     # into the executable, so we push the target files to the
192     # depending executable target via direct_dependent_settings.
193     {
194       'target_name': 'sync_core_tests',
195       'type': 'none',
196       # We only want unit test executables to include this target.
197       'suppress_wildcard': 1,
198       'dependencies': [
199         '../base/base.gyp:base',
200         '../sql/sql.gyp:sql',
201         '../testing/gmock.gyp:gmock',
202         '../testing/gtest.gyp:gtest',
203         'sync',
204         'test_support_sync_core',
205       ],
206       'conditions': [
207         ['OS=="linux" and chromeos==1', {
208           # Required by get_session_name_unittest.cc on Chrome OS.
209           'dependencies': [
210             '../chromeos/chromeos.gyp:chromeos',
211           ],
212         }],
213       ],
214       # Propagate all dependencies since the actual compilation
215       # happens in the dependents.
216       'export_dependent_settings': [
217         '../base/base.gyp:base',
218         '../sql/sql.gyp:sql',
219         '../testing/gmock.gyp:gmock',
220         '../testing/gtest.gyp:gtest',
221         'sync',
222         'test_support_sync_core',
223       ],
224       'direct_dependent_settings': {
225         'include_dirs': [
226           '..',
227         ],
228         'sources': [
229           'internal_api/public/base/cancelation_signal_unittest.cc',
230           'internal_api/public/base/enum_set_unittest.cc',
231           'internal_api/public/base/node_ordinal_unittest.cc',
232           'internal_api/public/base/ordinal_unittest.cc',
233           'internal_api/public/base/unique_position_unittest.cc',
234           'internal_api/public/engine/model_safe_worker_unittest.cc',
235           'internal_api/public/util/immutable_unittest.cc',
236           'internal_api/public/util/weak_handle_unittest.cc',
237           'engine/apply_control_data_updates_unittest.cc',
238           'engine/apply_updates_and_resolve_conflicts_command_unittest.cc',
239           'engine/backoff_delay_provider_unittest.cc',
240           'engine/download_unittest.cc',
241           'engine/model_changing_syncer_command_unittest.cc',
242           'engine/process_updates_command_unittest.cc',
243           'engine/store_timestamps_command_unittest.cc',
244           'engine/sync_scheduler_unittest.cc',
245           'engine/syncer_proto_util_unittest.cc',
246           'engine/syncer_unittest.cc',
247           'engine/sync_directory_commit_contribution_unittest.cc',
248           'engine/traffic_recorder_unittest.cc',
249           'js/js_arg_list_unittest.cc',
250           'js/js_event_details_unittest.cc',
251           'js/sync_js_controller_unittest.cc',
252           'protocol/proto_enum_conversions_unittest.cc',
253           'protocol/proto_value_conversions_unittest.cc',
254           'sessions/nudge_tracker_unittest.cc',
255           'sessions/status_controller_unittest.cc',
256           'sessions/sync_session_unittest.cc',
257           'syncable/directory_backing_store_unittest.cc',
258           'syncable/model_type_unittest.cc',
259           'syncable/nigori_util_unittest.cc',
260           'syncable/parent_child_index_unittest.cc',
261           'syncable/syncable_enum_conversions_unittest.cc',
262           'syncable/syncable_id_unittest.cc',
263           'syncable/syncable_unittest.cc',
264           'syncable/syncable_util_unittest.cc',
265           'util/cryptographer_unittest.cc',
266           'util/data_type_histogram_unittest.cc',
267           'util/get_session_name_unittest.cc',
268           'util/nigori_unittest.cc',
269           'util/protobuf_unittest.cc',
270         ],
271         'conditions': [
272           ['OS == "ios" and coverage != 0', {
273             'sources!': [
274               # These sources can't be built with coverage due to a toolchain
275               # bug: http://openradar.appspot.com/radar?id=1499403
276               'engine/syncer_unittest.cc',
278               # These tests crash when run with coverage turned on due to an
279               # issue with llvm_gcda_increment_indirect_counter:
280               # http://crbug.com/156058
281               'syncable/directory_backing_store_unittest.cc',
282             ],
283           }],
284         ],
285       },
286     },
288     # Unit tests for the 'sync_notifier' target.  This cannot be a static
289     # library because the unit test files have to be compiled directly
290     # into the executable, so we push the target files to the
291     # depending executable target via direct_dependent_settings.
292     {
293       'target_name': 'sync_notifier_tests',
294       'type': 'none',
295       # We only want unit test executables to include this target.
296       'suppress_wildcard': 1,
297       'dependencies': [
298         '../base/base.gyp:base',
299         '../jingle/jingle.gyp:notifier_test_util',
300         '../net/net.gyp:net_test_support',
301         '../testing/gmock.gyp:gmock',
302         '../testing/gtest.gyp:gtest',
303         '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
304         '../third_party/libjingle/libjingle.gyp:libjingle',
305         'sync',
306         'test_support_sync_notifier',
307       ],
308       # Propagate all dependencies since the actual compilation
309       # happens in the dependents.
310       'export_dependent_settings': [
311         '../base/base.gyp:base',
312         '../jingle/jingle.gyp:notifier_test_util',
313         '../net/net.gyp:net_test_support',
314         '../testing/gmock.gyp:gmock',
315         '../testing/gtest.gyp:gtest',
316         '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation',
317         '../third_party/libjingle/libjingle.gyp:libjingle',
318         'sync',
319         'test_support_sync_notifier',
320       ],
321       'direct_dependent_settings': {
322         'include_dirs': [
323           '..',
324         ],
325         'conditions': [
326           ['OS != "android"', {
327             'sources': [
328               'notifier/ack_tracker_unittest.cc',
329               'notifier/fake_invalidator_unittest.cc',
330               'notifier/invalidation_notifier_unittest.cc',
331               'notifier/invalidator_registrar_unittest.cc',
332               'notifier/non_blocking_invalidator_unittest.cc',
333               'notifier/object_id_invalidation_map_unittest.cc',
334               'notifier/single_object_invalidation_set_unittest.cc',
335               'notifier/p2p_invalidator_unittest.cc',
336               'notifier/push_client_channel_unittest.cc',
337               'notifier/registration_manager_unittest.cc',
338               'notifier/sync_invalidation_listener_unittest.cc',
339               'notifier/sync_system_resources_unittest.cc',
340             ],
341           }],
342         ],
343       },
344     },
346     # Unit tests for the 'sync_internal_api' target.  This cannot be a static
347     # library because the unit test files have to be compiled directly
348     # into the executable, so we push the target files to the
349     # depending executable target via direct_dependent_settings.
350     {
351       'target_name': 'sync_internal_api_tests',
352       'type': 'none',
353       # We only want unit test executables to include this target.
354       'suppress_wildcard': 1,
355       'dependencies': [
356         '../base/base.gyp:base',
357         '../net/net.gyp:net',
358         '../net/net.gyp:net_test_support',
359         '../testing/gmock.gyp:gmock',
360         '../testing/gtest.gyp:gtest',
361         'sync',
362         'test_support_sync_internal_api',
363       ],
364       # Propagate all dependencies since the actual compilation
365       # happens in the dependents.
366       'export_dependent_settings': [
367         '../base/base.gyp:base',
368         '../net/net.gyp:net',
369         '../net/net.gyp:net_test_support',
370         '../testing/gmock.gyp:gmock',
371         '../testing/gtest.gyp:gtest',
372         'sync',
373         'test_support_sync_internal_api',
374       ],
375       'direct_dependent_settings': {
376         'include_dirs': [
377           '..',
378         ],
379         'sources': [
380           'internal_api/debug_info_event_listener_unittest.cc',
381           'internal_api/http_bridge_unittest.cc',
382           'internal_api/js_mutation_event_observer_unittest.cc',
383           'internal_api/js_sync_encryption_handler_observer_unittest.cc',
384           'internal_api/js_sync_manager_observer_unittest.cc',
385           'internal_api/public/change_record_unittest.cc',
386           'internal_api/public/sessions/sync_session_snapshot_unittest.cc',
387           'internal_api/syncapi_server_connection_manager_unittest.cc',
388           'internal_api/sync_encryption_handler_impl_unittest.cc',
389           'internal_api/sync_manager_impl_unittest.cc',
390         ],
391         'conditions': [
392           ['OS == "ios"', {
393             'sources!': [
394               'internal_api/http_bridge_unittest.cc',
395             ],
396           }],
397         ],
398       },
399     },
401     # Unit tests for the 'sync_api' target.  This cannot be a static
402     # library because the unit test files have to be compiled directly
403     # into the executable, so we push the target files to the
404     # depending executable target via direct_dependent_settings.
405     {
406       'target_name': 'sync_api_tests',
407       'type': 'none',
408       # We only want unit test executables to include this target.
409       'suppress_wildcard': 1,
410       'dependencies': [
411         '../base/base.gyp:base',
412         '../testing/gtest.gyp:gtest',
413         'sync',
414         'test_support_sync_internal_api',
415       ],
416       # Propagate all dependencies since the actual compilation
417       # happens in the dependents.
418       'export_dependent_settings': [
419         '../base/base.gyp:base',
420         '../testing/gtest.gyp:gtest',
421         'sync',
422         'test_support_sync_internal_api',
423       ],
424       'direct_dependent_settings': {
425         'include_dirs': [
426           '..',
427         ],
428         'sources': [
429           'api/sync_change_unittest.cc',
430           'api/sync_error_unittest.cc',
431           'api/sync_merge_result_unittest.cc',
432         ],
433       },
434     },
436     # The unit test executable for sync tests.
437     {
438       'target_name': 'sync_unit_tests',
439       'type': '<(gtest_target_type)',
440       # Typed-parametrized tests generate exit-time destructors.
441       'variables': { 'enable_wexit_time_destructors': 0, },
442       'defines': [
443         'SYNC_TEST',
444       ],
445       'dependencies': [
446         '../base/base.gyp:run_all_unittests',
447         'sync_api_tests',
448         'sync_core_tests',
449         'sync_internal_api_tests',
450         'sync_notifier_tests',
451       ],
452       'conditions': [
453         # TODO(akalin): This is needed because histogram.cc uses
454         # leak_annotations.h, which pulls this in.  Make 'base'
455         # propagate this dependency.
456         ['OS=="linux" and linux_use_tcmalloc==1', {
457           'dependencies': [
458             '../base/allocator/allocator.gyp:allocator',
459           ],
460         }],
461         ['OS == "android" and gtest_target_type == "shared_library"', {
462           'dependencies': [
463             '../testing/android/native_test.gyp:native_test_native_code',
464           ],
465         }],
466       ],
467     },
469     # Test support files for using the Test Accounts service.
470     {
471       'target_name': 'test_support_accounts_client',
472       'type': 'static_library',
473       'direct_dependent_settings': {
474         'include_dirs': [
475           '..',
476         ],
477       },
478       'dependencies': [
479         '../base/base.gyp:base',
480         '../net/net.gyp:net',
481       ],
482       'sources': [
483         'test/accounts_client/test_accounts_client.cc',
484         'test/accounts_client/test_accounts_client.h',
485         'test/accounts_client/url_request_context_getter.cc',
486         'test/accounts_client/url_request_context_getter.h',
487       ],
488     },
490     # The Sync end-to-end (and associated infrastructure) tests.
491     {
492       'target_name': 'sync_endtoend_tests',
493       'type': '<(gtest_target_type)',
494       'dependencies': [
495         '../base/base.gyp:run_all_unittests',
496         '../testing/gmock.gyp:gmock',
497         '../testing/gtest.gyp:gtest',
498         '../url/url.gyp:url_lib',
499         'test_support_accounts_client',
500       ],
501       'sources': [
502         'test/accounts_client/test_accounts_client_unittest.cc',
503       ],
504     },
506   ],
507   'conditions': [
508     ['OS != "ios"', {
509       'targets': [
510         {
511           'target_name': 'sync_tools_helper',
512           'type': 'static_library',
513           'defines': [
514             'SYNC_IMPLEMENTATION',
515           ],
516           'include_dirs': [
517             '..',
518           ],
519           'dependencies': [
520             '../base/base.gyp:base',
521             'sync',
522           ],
523           'export_dependent_settings': [
524             '../base/base.gyp:base',
525             'sync',
526           ],
527           'sources': [
528             'tools/null_invalidation_state_tracker.cc',
529             'tools/null_invalidation_state_tracker.h',
530           ],
531         },
533         # A tool that can be used to launch a python sync server instance.
534         {
535           'target_name': 'run_sync_testserver',
536           'type': 'executable',
537           'dependencies': [
538             '../base/base.gyp:base',
539             '../base/base.gyp:test_support_base',
540             '../net/net.gyp:net_test_support',
541             '../testing/gtest.gyp:gtest',
542             'test_support_sync_testserver',
543           ],
544           'sources': [
545             'tools/testserver/run_sync_testserver.cc',
546           ],
547         },
549         # A tool to listen to sync notifications and print them out.
550         {
551           'target_name': 'sync_listen_notifications',
552           'type': 'executable',
553           'defines': [
554             'SYNC_TEST',
555           ],
556           'dependencies': [
557             '../base/base.gyp:base',
558             '../jingle/jingle.gyp:notifier',
559             '../net/net.gyp:net',
560             '../net/net.gyp:net_test_support',
561             'sync',
562             'sync_tools_helper',
563           ],
564           'sources': [
565             'tools/sync_listen_notifications.cc',
566           ],
567         },
569         # A standalone command-line sync client.
570         {
571           'target_name': 'sync_client',
572           'type': 'executable',
573           'defines': [
574             'SYNC_TEST',
575           ],
576           'dependencies': [
577             '../base/base.gyp:base',
578             '../jingle/jingle.gyp:notifier',
579             '../net/net.gyp:net',
580             '../net/net.gyp:net_test_support',
581             'sync',
582             'sync_tools_helper',
583             'test_support_sync_core'
584           ],
585           'sources': [
586             'tools/sync_client.cc',
587           ],
588         },
589       ],
590     }],
591     ['OS == "android"', {
592       'targets': [
593         {
594           'target_name': 'sync_javatests',
595           'type': 'none',
596           'variables': {
597             'java_in_dir': '../sync/android/javatests',
598           },
599           'dependencies': [
600             'sync_java',
601             'sync_java_test_support',
602             '../base/base.gyp:base_java_test_support',
603           ],
604           'includes': [ '../build/java.gypi' ],
605         },
606         {
607           'target_name': 'sync_java_test_support',
608           'type': 'none',
609           'variables': {
610             'package_name': 'sync_java_test_support',
611             'java_in_dir': '../sync/test/android/javatests',
612           },
613           'dependencies': [
614             'sync_java',
615           ],
616           'includes': [ '../build/java.gypi' ],
617         },
618       ],
619     }],
620     # Special target to wrap a gtest_target_type==shared_library
621     # sync_unit_tests into an android apk for execution.
622     ['OS == "android" and gtest_target_type == "shared_library"', {
623       'targets': [
624         {
625           'target_name': 'sync_unit_tests_apk',
626           'type': 'none',
627           'dependencies': [
628             'sync_unit_tests',
629           ],
630           'variables': {
631             'test_suite_name': 'sync_unit_tests',
632             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sync_unit_tests<(SHARED_LIB_SUFFIX)',
633           },
634           'includes': [ '../build/apk_test.gypi' ],
635         },
636       ],
637     }],
638   ],