Telemetry: More elegant histogram printing.
[chromium-blink-merge.git] / cc / cc_tests.gyp
blob1781533bf55dbb012e0d370ecc55886918fecec1
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': 0,
8     'cc_unit_tests_source_files': [
9       'active_animation_unittest.cc',
10       'content_layer_unittest.cc',
11       'contents_scaling_layer_unittest.cc',
12       'damage_tracker_unittest.cc',
13       'delay_based_time_source_unittest.cc',
14       'delegated_renderer_layer_impl_unittest.cc',
15       'draw_quad_unittest.cc',
16       'float_quad_unittest.cc',
17       'frame_rate_controller_unittest.cc',
18       'gl_renderer_unittest.cc',
19       'gl_renderer_pixeltest.cc',
20       'hash_pair_unittest.cc',
21       'heads_up_display_unittest.cc',
22       'keyframed_animation_curve_unittest.cc',
23       'layer_animation_controller_unittest.cc',
24       'layer_impl_unittest.cc',
25       'layer_iterator_unittest.cc',
26       'layer_quad_unittest.cc',
27       'layer_sorter_unittest.cc',
28       'layer_tree_host_common_unittest.cc',
29       'layer_tree_host_impl_unittest.cc',
30       'layer_tree_host_unittest.cc',
31       'layer_unittest.cc',
32       'math_util_unittest.cc',
33       'nine_patch_layer_impl_unittest.cc',
34       'nine_patch_layer_unittest.cc',
35       'occlusion_tracker_unittest.cc',
36       'picture_layer_tiling_set_unittest.cc',
37       'picture_layer_tiling_unittest.cc',
38       'prioritized_resource_unittest.cc',
39       'quad_culler_unittest.cc',
40       'region_unittest.cc',
41       'render_pass_unittest.cc',
42       'render_surface_filters_unittest.cc',
43       'render_surface_unittest.cc',
44       'resource_provider_unittest.cc',
45       'resource_update_controller_unittest.cc',
46       'scheduler_state_machine_unittest.cc',
47       'scheduler_unittest.cc',
48       'scoped_resource_unittest.cc',
49       'scrollbar_animation_controller_linear_fade_unittest.cc',
50       'scrollbar_layer_unittest.cc',
51       'software_renderer_unittest.cc',
52       'solid_color_layer_impl_unittest.cc',
53       'texture_copier_unittest.cc',
54       'texture_layer_unittest.cc',
55       'texture_uploader_unittest.cc',
56       'tile_priority_unittest.cc',
57       'tiled_layer_impl_unittest.cc',
58       'tiled_layer_unittest.cc',
59       'tree_synchronizer_unittest.cc',
60       'timing_function_unittest.cc',
61       'test/fake_web_graphics_context_3d_unittest.cc',
62     ],
63     'cc_tests_support_files': [
64       'test/animation_test_common.cc',
65       'test/animation_test_common.h',
66       'test/compositor_fake_web_graphics_context_3d.h',
67       'test/fake_content_layer_client.cc',
68       'test/fake_content_layer_client.h',
69       'test/fake_impl_proxy.h',
70       'test/fake_output_surface.h',
71       'test/fake_layer_tree_host_client.cc',
72       'test/fake_layer_tree_host_client.h',
73       'test/fake_layer_tree_host_impl.cc',
74       'test/fake_layer_tree_host_impl_client.cc',
75       'test/fake_layer_tree_host_impl_client.h',
76       'test/fake_layer_tree_host_impl.h',
77       'test/fake_picture_layer_tiling_client.cc',
78       'test/fake_picture_layer_tiling_client.h',
79       'test/fake_proxy.cc',
80       'test/fake_proxy.h',
81       'test/fake_tile_manager_client.h',
82       'test/fake_output_surface.cc',
83       'test/fake_output_surface.h',
84       'test/fake_software_output_device.cc',
85       'test/fake_software_output_device.h',
86       'test/fake_web_graphics_context_3d.h',
87       'test/fake_web_scrollbar_theme_geometry.h',
88       'test/geometry_test_utils.cc',
89       'test/geometry_test_utils.h',
90       'test/layer_test_common.cc',
91       'test/layer_test_common.h',
92       'test/layer_tree_test_common.cc',
93       'test/layer_tree_test_common.h',
94       'test/mock_quad_culler.cc',
95       'test/mock_quad_culler.h',
96       'test/occlusion_tracker_test_common.h',
97       'test/paths.cc',
98       'test/paths.h',
99       'test/pixel_test_output_surface.cc',
100       'test/pixel_test_output_surface.h',
101       'test/render_pass_test_common.cc',
102       'test/render_pass_test_common.h',
103       'test/scheduler_test_common.cc',
104       'test/scheduler_test_common.h',
105       'test/tiled_layer_test_common.cc',
106       'test/tiled_layer_test_common.h',
107     ],
108   },
109   'targets': [
110     {
111       'target_name': 'cc_unittests',
112       'type': '<(gtest_target_type)',
113       'dependencies': [
114         '../base/base.gyp:test_support_base',
115         '../media/media.gyp:media',
116         '../skia/skia.gyp:skia',
117         '../testing/gmock.gyp:gmock',
118         '../testing/gtest.gyp:gtest',
119         '../ui/ui.gyp:ui',
120         '../webkit/support/webkit_support.gyp:webkit_gpu',
121         'cc.gyp:cc',
122         'cc_test_support',
123         'cc_test_utils',
124       ],
125       'sources': [
126         'test/run_all_unittests.cc',
127         'test/cc_test_suite.cc',
128         '<@(cc_unit_tests_source_files)',
129       ],
130       'include_dirs': [
131         'test',
132         '.',
133         '../third_party/WebKit/Source/Platform/chromium',
134       ],
135       'conditions': [
136         ['OS == "android" and gtest_target_type == "shared_library"', {
137           'dependencies': [
138             '../testing/android/native_test.gyp:native_test_native_code',
139           ],
140         }],
141       ],
142     },
143     {
144       'target_name': 'cc_perftests',
145       'type': '<(gtest_target_type)',
146       'dependencies': [
147         '../base/base.gyp:test_support_base',
148         '../media/media.gyp:media',
149         '../skia/skia.gyp:skia',
150         '../testing/gmock.gyp:gmock',
151         '../testing/gtest.gyp:gtest',
152         '../ui/ui.gyp:ui',
153         'cc.gyp:cc',
154         'cc_test_support',
155       ],
156       'sources': [
157         'layer_tree_host_perftest.cc',
158         'test/run_all_unittests.cc',
159         'test/cc_test_suite.cc',
160       ],
161       'include_dirs': [
162         'test',
163         '.',
164         '../third_party/WebKit/Source/Platform/chromium',
165       ],
166       'conditions': [
167         ['OS == "android" and gtest_target_type == "shared_library"', {
168           'dependencies': [
169             '../testing/android/native_test.gyp:native_test_native_code',
170           ],
171         }],
172       ],
173     },
174     {
175       'target_name': 'cc_test_support',
176       'type': 'static_library',
177       'include_dirs': [
178         'test',
179         '.',
180         '..',
181         '../third_party/WebKit/Source/Platform/chromium',
182       ],
183       'dependencies': [
184         '../skia/skia.gyp:skia',
185         '../testing/gmock.gyp:gmock',
186         '../testing/gtest.gyp:gtest',
187         '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
188         '../third_party/mesa/mesa.gyp:osmesa',
189         '../ui/gl/gl.gyp:gl',
190       ],
191       'sources': [
192         '<@(cc_tests_support_files)',
193       ],
194     },
195     {
196       'target_name': 'cc_test_utils',
197       'type': 'static_library',
198       'include_dirs': [
199         '..'
200       ],
201       'sources': [
202         'test/pixel_test_utils.cc',
203         'test/pixel_test_utils.h',
204       ],
205       'dependencies': [
206         '../skia/skia.gyp:skia',
207         '../ui/ui.gyp:ui',  # for png_codec
208       ],
209     },
210   ],
211   'conditions': [
212     # Special target to wrap a gtest_target_type==shared_library
213     # cc_unittests into an android apk for execution.
214     ['OS == "android" and gtest_target_type == "shared_library"', {
215       'targets': [
216         {
217           'target_name': 'cc_unittests_apk',
218           'type': 'none',
219           'dependencies': [
220             'cc_unittests',
221           ],
222           'variables': {
223             'test_suite_name': 'cc_unittests',
224             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)cc_unittests<(SHARED_LIB_SUFFIX)',
225           },
226           'includes': [ '../build/apk_test.gypi' ],
227         },
228         {
229           'target_name': 'cc_perftests_apk',
230           'type': 'none',
231           'dependencies': [
232             'cc_perftests',
233           ],
234           'variables': {
235             'test_suite_name': 'cc_perftests',
236             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)cc_perftests<(SHARED_LIB_SUFFIX)',
237           },
238           'includes': [ '../build/apk_test.gypi' ],
239         },
240       ],
241     }]
242   ],