Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / cc / cc_tests.gyp
blobc5a0124c0922f01d033a2801d0426b3eb84031c9
1 # Copyright (c) 2012 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   'variables': {
7     'chromium_code': 1,
8     'cc_unit_tests_source_files': [
9       'animation/animation_host_unittest.cc',
10       'animation/animation_player_unittest.cc',
11       'animation/animation_timeline_unittest.cc',
12       'animation/animation_unittest.cc',
13       'animation/element_animations_unittest.cc',
14       'animation/keyframed_animation_curve_unittest.cc',
15       'animation/layer_animation_controller_unittest.cc',
16       'animation/scroll_offset_animation_curve_unittest.cc',
17       'animation/scrollbar_animation_controller_linear_fade_unittest.cc',
18       'animation/scrollbar_animation_controller_thinning_unittest.cc',
19       'animation/transform_operations_unittest.cc',
20       'base/delayed_unique_notifier_unittest.cc',
21       'base/float_quad_unittest.cc',
22       'base/histograms_unittest.cc',
23       'base/list_container_unittest.cc',
24       'base/math_util_unittest.cc',
25       'base/random_access_list_container_unittest.cc',
26       'base/region_unittest.cc',
27       'base/rolling_time_delta_history_unittest.cc',
28       'base/scoped_ptr_vector_unittest.cc',
29       'base/simple_enclosed_region_unittest.cc',
30       'base/tiling_data_unittest.cc',
31       'base/unique_notifier_unittest.cc',
32       'debug/frame_timing_tracker_unittest.cc',
33       'debug/micro_benchmark_controller_unittest.cc',
34       'debug/rendering_stats_unittest.cc',
35       'input/scroll_state_unittest.cc',
36       'input/top_controls_manager_unittest.cc',
37       'layers/delegated_frame_provider_unittest.cc',
38       'layers/delegated_frame_resource_collection_unittest.cc',
39       'layers/delegated_renderer_layer_impl_unittest.cc',
40       'layers/delegated_renderer_layer_unittest.cc',
41       'layers/heads_up_display_layer_impl_unittest.cc',
42       'layers/heads_up_display_unittest.cc',
43       'layers/io_surface_layer_impl_unittest.cc',
44       'layers/layer_impl_unittest.cc',
45       'layers/layer_iterator_unittest.cc',
46       'layers/layer_position_constraint_unittest.cc',
47       'layers/layer_unittest.cc',
48       'layers/layer_utils_unittest.cc',
49       'layers/nine_patch_layer_impl_unittest.cc',
50       'layers/nine_patch_layer_unittest.cc',
51       'layers/painted_scrollbar_layer_impl_unittest.cc',
52       'layers/picture_image_layer_impl_unittest.cc',
53       'layers/picture_image_layer_unittest.cc',
54       'layers/picture_layer_impl_unittest.cc',
55       'layers/picture_layer_unittest.cc',
56       'layers/render_surface_impl_unittest.cc',
57       'layers/render_surface_unittest.cc',
58       'layers/scrollbar_layer_unittest.cc',
59       'layers/solid_color_layer_impl_unittest.cc',
60       'layers/solid_color_scrollbar_layer_impl_unittest.cc',
61       'layers/surface_layer_impl_unittest.cc',
62       'layers/surface_layer_unittest.cc',
63       'layers/texture_layer_impl_unittest.cc',
64       'layers/texture_layer_unittest.cc',
65       'layers/ui_resource_layer_impl_unittest.cc',
66       'layers/ui_resource_layer_unittest.cc',
67       'layers/video_frame_provider_client_impl_unittest.cc',
68       'layers/video_layer_impl_unittest.cc',
69       'output/begin_frame_args_unittest.cc',
70       'output/bsp_tree_unittest.cc',
71       'output/delegating_renderer_unittest.cc',
72       'output/filter_operations_unittest.cc',
73       'output/gl_renderer_unittest.cc',
74       'output/layer_quad_unittest.cc',
75       'output/output_surface_unittest.cc',
76       'output/overlay_unittest.cc',
77       'output/renderer_pixeltest.cc',
78       'output/renderer_unittest.cc',
79       'output/shader_unittest.cc',
80       'output/software_renderer_unittest.cc',
81       'output/texture_mailbox_deleter_unittest.cc',
82       'playback/discardable_image_map_unittest.cc',
83       'playback/display_item_list_unittest.cc',
84       'playback/display_list_raster_source_unittest.cc',
85       'playback/display_list_recording_source_unittest.cc',
86       'playback/picture_pile_impl_unittest.cc',
87       'playback/picture_pile_unittest.cc',
88       'playback/picture_unittest.cc',
89       'playback/recording_source_unittest.cc',
90       'quads/draw_polygon_unittest.cc',
91       'quads/draw_quad_unittest.cc',
92       'quads/render_pass_unittest.cc',
93       'raster/scoped_gpu_raster_unittest.cc',
94       'raster/task_graph_runner_unittest.cc',
95       'raster/texture_compressor_etc1_unittest.cc',
96       'raster/tile_task_worker_pool_unittest.cc',
97       'resources/platform_color_unittest.cc',
98       'resources/resource_pool_unittest.cc',
99       'resources/resource_provider_unittest.cc',
100       'resources/resource_util_unittest.cc',
101       'resources/scoped_resource_unittest.cc',
102       'resources/video_resource_updater_unittest.cc',
103       'scheduler/begin_frame_source_unittest.cc',
104       'scheduler/compositor_timing_history_unittest.cc',
105       'scheduler/delay_based_time_source_unittest.cc',
106       'scheduler/scheduler_state_machine_unittest.cc',
107       'scheduler/scheduler_unittest.cc',
108       'test/layer_tree_json_parser_unittest.cc',
109       'test/ordered_simple_task_runner_unittest.cc',
110       'test/test_web_graphics_context_3d_unittest.cc',
111       'tiles/picture_layer_tiling_set_unittest.cc',
112       'tiles/picture_layer_tiling_unittest.cc',
113       'tiles/tile_manager_unittest.cc',
114       'tiles/tile_priority_unittest.cc',
115       'trees/blocking_task_runner_unittest.cc',
116       'trees/damage_tracker_unittest.cc',
117       'trees/layer_tree_host_common_unittest.cc',
118       'trees/layer_tree_host_impl_unittest.cc',
119       'trees/layer_tree_host_pixeltest_blending.cc',
120       'trees/layer_tree_host_pixeltest_filters.cc',
121       'trees/layer_tree_host_pixeltest_masks.cc',
122       'trees/layer_tree_host_pixeltest_readback.cc',
123       'trees/layer_tree_host_pixeltest_synchronous.cc',
124       'trees/layer_tree_host_pixeltest_tiles.cc',
125       'trees/layer_tree_host_unittest.cc',
126       'trees/layer_tree_host_unittest_animation.cc',
127       'trees/layer_tree_host_unittest_animation_timelines.cc',
128       'trees/layer_tree_host_unittest_context.cc',
129       'trees/layer_tree_host_unittest_copyrequest.cc',
130       'trees/layer_tree_host_unittest_damage.cc',
131       'trees/layer_tree_host_unittest_delegated.cc',
132       'trees/layer_tree_host_unittest_occlusion.cc',
133       'trees/layer_tree_host_unittest_picture.cc',
134       'trees/layer_tree_host_unittest_proxy.cc',
135       'trees/layer_tree_host_unittest_scroll.cc',
136       'trees/layer_tree_host_unittest_video.cc',
137       'trees/layer_tree_impl_unittest.cc',
138       'trees/occlusion_tracker_unittest.cc',
139       'trees/occlusion_unittest.cc',
140       'trees/property_tree_unittest.cc',
141       'trees/tree_synchronizer_unittest.cc',
142     ],
143     'cc_surfaces_unit_tests_source_files': [
144       'surfaces/display_unittest.cc',
145       'surfaces/display_scheduler_unittest.cc',
146       'surfaces/surface_aggregator_test_helpers.cc',
147       'surfaces/surface_aggregator_test_helpers.h',
148       'surfaces/surface_aggregator_unittest.cc',
149       'surfaces/surface_display_output_surface_unittest.cc',
150       'surfaces/surface_factory_unittest.cc',
151       'surfaces/surface_hittest_unittest.cc',
152       'surfaces/surface_unittest.cc',
153       'surfaces/surfaces_pixeltest.cc',
154     ],
155     'cc_tests_support_files': [
156       'test/animation_test_common.cc',
157       'test/animation_test_common.h',
158       'test/animation_timelines_test_common.cc',
159       'test/animation_timelines_test_common.h',
160       'test/begin_frame_args_test.cc',
161       'test/begin_frame_args_test.h',
162       'test/failure_output_surface.cc',
163       'test/failure_output_surface.h',
164       'test/fake_content_layer_client.cc',
165       'test/fake_content_layer_client.h',
166       'test/fake_delegated_renderer_layer.cc',
167       'test/fake_delegated_renderer_layer.h',
168       'test/fake_delegated_renderer_layer_impl.cc',
169       'test/fake_delegated_renderer_layer_impl.h',
170       'test/fake_display_list_recording_source.cc',
171       'test/fake_display_list_recording_source.h',
172       'test/fake_external_begin_frame_source.cc',
173       'test/fake_external_begin_frame_source.h',
174       'test/fake_impl_proxy.h',
175       'test/fake_layer_tree_host.cc',
176       'test/fake_layer_tree_host.h',
177       'test/fake_layer_tree_host_client.cc',
178       'test/fake_layer_tree_host_client.h',
179       'test/fake_layer_tree_host_impl.cc',
180       'test/fake_layer_tree_host_impl.h',
181       'test/fake_layer_tree_host_impl_client.cc',
182       'test/fake_layer_tree_host_impl_client.h',
183       'test/fake_output_surface.cc',
184       'test/fake_output_surface.h',
185       'test/fake_output_surface_client.cc',
186       'test/fake_output_surface_client.h',
187       'test/fake_painted_scrollbar_layer.cc',
188       'test/fake_painted_scrollbar_layer.h',
189       'test/fake_picture_layer.cc',
190       'test/fake_picture_layer.h',
191       'test/fake_picture_layer_impl.cc',
192       'test/fake_picture_layer_impl.h',
193       'test/fake_picture_layer_tiling_client.cc',
194       'test/fake_picture_layer_tiling_client.h',
195       'test/fake_picture_pile.cc',
196       'test/fake_picture_pile.h',
197       'test/fake_picture_pile_impl.cc',
198       'test/fake_picture_pile_impl.h',
199       'test/fake_proxy.cc',
200       'test/fake_proxy.h',
201       'test/fake_renderer_client.cc',
202       'test/fake_renderer_client.h',
203       'test/fake_rendering_stats_instrumentation.h',
204       'test/fake_resource_provider.h',
205       'test/fake_scoped_ui_resource.cc',
206       'test/fake_scoped_ui_resource.h',
207       'test/fake_scrollbar.cc',
208       'test/fake_scrollbar.h',
209       'test/fake_tile_manager.cc',
210       'test/fake_tile_manager.h',
211       'test/fake_tile_manager_client.cc',
212       'test/fake_tile_manager_client.h',
213       'test/fake_ui_resource_layer_tree_host_impl.cc',
214       'test/fake_ui_resource_layer_tree_host_impl.h',
215       'test/fake_video_frame_provider.cc',
216       'test/fake_video_frame_provider.h',
217       'test/geometry_test_utils.cc',
218       'test/geometry_test_utils.h',
219       'test/layer_test_common.cc',
220       'test/layer_test_common.h',
221       'test/layer_tree_host_common_test.cc',
222       'test/layer_tree_host_common_test.h',
223       'test/layer_tree_json_parser.cc',
224       'test/layer_tree_json_parser.h',
225       'test/layer_tree_pixel_resource_test.cc',
226       'test/layer_tree_pixel_resource_test.h',
227       'test/layer_tree_pixel_test.cc',
228       'test/layer_tree_pixel_test.h',
229       'test/layer_tree_test.cc',
230       'test/layer_tree_test.h',
231       'test/mock_occlusion_tracker.h',
232       'test/ordered_simple_task_runner.cc',
233       'test/ordered_simple_task_runner.h',
234       'test/ordered_texture_map.cc',
235       'test/ordered_texture_map.h',
236       'test/paths.cc',
237       'test/paths.h',
238       'test/pixel_comparator.cc',
239       'test/pixel_comparator.h',
240       'test/pixel_test.cc',
241       'test/pixel_test.h',
242       'test/pixel_test_output_surface.cc',
243       'test/pixel_test_output_surface.h',
244       'test/pixel_test_software_output_device.cc',
245       'test/pixel_test_software_output_device.h',
246       'test/pixel_test_utils.cc',
247       'test/pixel_test_utils.h',
248       'test/render_pass_test_utils.cc',
249       'test/render_pass_test_utils.h',
250       'test/scheduler_test_common.cc',
251       'test/scheduler_test_common.h',
252       'test/skia_common.cc',
253       'test/skia_common.h',
254       'test/solid_color_content_layer_client.cc',
255       'test/solid_color_content_layer_client.h',
256       'test/test_context_provider.cc',
257       'test/test_context_provider.h',
258       'test/test_context_support.cc',
259       'test/test_context_support.h',
260       'test/test_gles2_interface.cc',
261       'test/test_gles2_interface.h',
262       'test/test_gpu_memory_buffer_manager.cc',
263       'test/test_gpu_memory_buffer_manager.h',
264       'test/test_image_factory.cc',
265       'test/test_image_factory.h',
266       'test/test_in_process_context_provider.cc',
267       'test/test_in_process_context_provider.h',
268       'test/test_occlusion_tracker.h',
269       'test/test_shared_bitmap_manager.cc',
270       'test/test_shared_bitmap_manager.h',
271       'test/test_task_graph_runner.cc',
272       'test/test_task_graph_runner.h',
273       'test/test_texture.cc',
274       'test/test_texture.h',
275       'test/test_tile_priorities.cc',
276       'test/test_tile_priorities.h',
277       'test/test_web_graphics_context_3d.cc',
278       'test/test_web_graphics_context_3d.h',
279     ],
280   },
281   'targets': [
282     {
283       'target_name': 'cc_unittests',
284       'type': '<(gtest_target_type)',
285       'dependencies': [
286         '../base/base.gyp:test_support_base',
287         '../gpu/command_buffer/command_buffer.gyp:gles2_utils',
288         '../gpu/gpu.gyp:gpu',
289         '../gpu/gpu.gyp:gpu_unittest_utils',
290         '../media/media.gyp:media',
291         '../skia/skia.gyp:skia',
292         '../testing/gmock.gyp:gmock',
293         '../testing/gtest.gyp:gtest',
294         '../ui/events/events.gyp:events_base',
295         '../ui/gfx/gfx.gyp:gfx',
296         '../ui/gfx/gfx.gyp:gfx_geometry',
297         'cc.gyp:cc',
298         'cc.gyp:cc_surfaces',
299         'cc_test_support',
300       ],
301       'sources': [
302         'test/cc_test_suite.cc',
303         'test/run_all_unittests.cc',
304         '<@(cc_unit_tests_source_files)',
305         '<@(cc_surfaces_unit_tests_source_files)',
306       ],
307       'include_dirs': [
308         'test',
309         '.',
310       ],
311       'conditions': [
312         ['OS == "android"',
313           {
314             'dependencies': [
315               '../testing/android/native_test.gyp:native_test_native_code',
316             ],
317           }
318         ],
319         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"',
320           {
321             'conditions': [
322               [ 'use_allocator!="none"',
323                 {
324                   'dependencies': [
325                     '../base/allocator/allocator.gyp:allocator',
326                   ],
327                 }
328               ],
329             ],
330           }
331         ],
332       ],
333     },
334     {
335       # GN version: //cc/cc_perftests
336       'target_name': 'cc_perftests',
337       'type': '<(gtest_target_type)',
338       'dependencies': [
339         '../base/base.gyp:test_support_base',
340         '../gpu/command_buffer/command_buffer.gyp:gles2_utils',
341         '../gpu/gpu.gyp:gpu',
342         '../gpu/gpu.gyp:gpu_unittest_utils',
343         '../media/media.gyp:media',
344         '../skia/skia.gyp:skia',
345         '../testing/gmock.gyp:gmock',
346         '../testing/gtest.gyp:gtest',
347         '../testing/perf/perf_test.gyp:*',
348         '../ui/gfx/gfx.gyp:gfx',
349         '../ui/gfx/gfx.gyp:gfx_geometry',
350         'cc.gyp:cc',
351         'cc.gyp:cc_surfaces',
352         'cc_test_support',
353       ],
354       'sources': [
355         # Note: sources list duplicated in GN build.
356         'layers/layer_perftest.cc',
357         'layers/picture_layer_impl_perftest.cc',
358         'playback/picture_pile_impl_perftest.cc',
359         'quads/draw_quad_perftest.cc',
360         'raster/task_graph_runner_perftest.cc',
361         'raster/texture_compressor_perftest.cc',
362         'raster/tile_task_worker_pool_perftest.cc',
363         'surfaces/surface_aggregator_perftest.cc',
364         'test/cc_test_suite.cc',
365         'test/run_all_perftests.cc',
366         'tiles/picture_layer_tiling_perftest.cc',
367         'tiles/tile_manager_perftest.cc',
368         'trees/layer_tree_host_common_perftest.cc',
369         'trees/layer_tree_host_perftest.cc',
370         'trees/occlusion_tracker_perftest.cc',
371       ],
372       'include_dirs': [
373         'test',
374         '.',
375       ],
376       'conditions': [
377         ['OS == "android"',
378           {
379             'dependencies': [
380               '../testing/android/native_test.gyp:native_test_native_code',
381             ],
382           }
383         ],
384         # See http://crbug.com/162998#c4 for why this is needed.
385         ['OS=="linux" and use_allocator!="none"',
386           {
387             'dependencies': [
388               '../base/allocator/allocator.gyp:allocator',
389             ],
390           }
391         ],
392       ],
393     },
394     {
395       'target_name': 'cc_test_support',
396       'type': 'static_library',
397       'include_dirs': [
398         'test',
399         '.',
400         '..',
401       ],
402       'dependencies': [
403         '../base/base.gyp:base',
404         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
405         '../gpu/command_buffer/command_buffer.gyp:gles2_utils',
406         '../gpu/gpu.gyp:gles2_c_lib',
407         '../gpu/gpu.gyp:gles2_implementation',
408         '../gpu/gpu.gyp:gl_in_process_context',
409         '../gpu/gpu.gyp:gpu',
410         '../gpu/gpu.gyp:gpu_unittest_utils',
411         '../gpu/skia_bindings/skia_bindings.gyp:gpu_skia_bindings',
412         '../skia/skia.gyp:skia',
413         '../testing/gmock.gyp:gmock',
414         '../testing/gtest.gyp:gtest',
415         '../third_party/mesa/mesa.gyp:osmesa',
416         '../ui/gfx/gfx.gyp:gfx',
417         '../ui/gfx/gfx.gyp:gfx_geometry',
418         '../ui/gfx/gfx.gyp:gfx_test_support',
419         '../ui/gl/gl.gyp:gl',
420         '../ui/gl/gl.gyp:gl_test_support',
421       ],
422       'sources': [
423         '<@(cc_tests_support_files)',
424       ],
425     },
426   ],
427   'conditions': [
428     ['OS == "android"',
429       {
430         'targets': [
431           {
432             'target_name': 'cc_unittests_apk',
433             'type': 'none',
434             'dependencies': [
435               'cc_unittests',
436             ],
437             'variables': {
438               'test_suite_name': 'cc_unittests',
439             },
440             'includes': [ '../build/apk_test.gypi' ],
441           },
442           {
443             'target_name': 'cc_perftests_apk',
444             'type': 'none',
445             'dependencies': [
446               'cc_perftests',
447             ],
448             'variables': {
449               'test_suite_name': 'cc_perftests',
450             },
451             'includes': [ '../build/apk_test.gypi' ],
452           },
453         ],
454       }
455     ],
456     ['test_isolation_mode != "noop"', {
457       'targets': [
458         {
459           'target_name': 'cc_unittests_run',
460           'type': 'none',
461           'dependencies': [
462             'cc_unittests',
463           ],
464           'includes': [
465             '../build/isolate.gypi',
466           ],
467           'sources': [
468             'cc_unittests.isolate',
469           ],
470           'conditions': [
471             # crbug.com/464062 xdisplaycheck is used to run cc_unittests_run on
472             # the linux try bots when using X11.
473             ['use_x11==1',
474               {
475                 'dependencies': [
476                   '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
477                 ],
478               }
479             ],
480           ],
481         },
482       ],
483     }],
484   ],