Popular sites on the NTP: Extend UMA histograms that track clicks and impressions
[chromium-blink-merge.git] / chromecast / chromecast_tests.gypi
blob1b81b3d773115d81809614ae21411d1101554daa
1 # Copyright (c) 2014 Google Inc. 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   },
9   'targets': [
10     {
11       'target_name': 'cast_base_unittests',
12       'type': '<(gtest_target_type)',
13       'dependencies': [
14         'chromecast.gyp:cast_base',
15         '../base/base.gyp:run_all_unittests',
16         '../testing/gtest.gyp:gtest',
17       ],
18       'sources': [
19         'base/error_codes_unittest.cc',
20         'base/path_utils_unittest.cc',
21         'base/process_utils_unittest.cc',
22         'base/serializers_unittest.cc',
23         'base/system_time_change_notifier_unittest.cc',
24       ],
25       'conditions': [
26         ['OS == "android"', {
27           'dependencies': [
28             '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
29           ],
30         }],
31       ],
32     },  # end of cast_base_unittests
33     {
34       'target_name': 'cast_crash_test_support',
35       'type': '<(component)',
36       'dependencies': [
37         'chromecast.gyp:cast_crash',
38         'cast_base',
39       ],
40       'sources': [
41         'crash/linux/crash_testing_utils.cc',
42         'crash/linux/crash_testing_utils.h',
43       ],
44     },  # end of target 'cast_crash_test_support'
45     {
46       'target_name': 'cast_crash_unittests',
47       'type': '<(gtest_target_type)',
48       'dependencies': [
49         'cast_crash_test_support',
50         'chromecast.gyp:cast_crash',
51         '../base/base.gyp:run_all_unittests',
52         '../testing/gmock.gyp:gmock',
53         '../testing/gtest.gyp:gtest',
54       ],
55       'include_dirs': [
56         '../breakpad/src',
57       ],
58       'sources': [
59         'crash/cast_crashdump_uploader_unittest.cc',
60         'crash/linux/dummy_minidump_generator_unittest.cc',
61         'crash/linux/dump_info_unittest.cc',
62         'crash/linux/synchronized_minidump_manager_unittest.cc',
63         'crash/linux/minidump_writer_unittest.cc',
64       ],
65       'conditions': [
66         ['OS == "android"', {
67           'dependencies': [
68             '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
69           ],
70         }],
71       ],
72     },  # end of cast_crash_unittests
73     {
74       'target_name': 'cast_tests',
75       'type': 'none',
76       'dependencies': [
77         'cast_test_generator',
78       ],
79       'conditions': [
80         ['chromecast_branding!="public"', {
81           'dependencies': [
82             'internal/chromecast_internal.gyp:cast_tests_internal',
83           ],
84         }],
85       ],
86     },
87     # This target only depends on targets that generate test binaries.
88     {
89       'target_name': 'cast_test_generator',
90       'type': 'none',
91       'dependencies': [
92         'cast_base_unittests',
93         'cast_crash_unittests',
94         '../base/base.gyp:base_unittests',
95         '../content/content_shell_and_tests.gyp:content_unittests',
96         '../crypto/crypto.gyp:crypto_unittests',
97         '../ipc/ipc.gyp:ipc_tests',
98         '../jingle/jingle.gyp:jingle_unittests',
99         '../media/media.gyp:media_unittests',
100         '../media/midi/midi.gyp:midi_unittests',
101         '../net/net.gyp:net_unittests',
102         '../sandbox/sandbox.gyp:sandbox_linux_unittests',
103         '../sql/sql.gyp:sql_unittests',
104         '../sync/sync.gyp:sync_unit_tests',
105         '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests',
106         '../ui/base/ui_base_tests.gyp:ui_base_unittests',
107         '../url/url.gyp:url_unittests',
108       ],
109       'conditions': [
110         ['target_arch=="arm" and OS!="android"', {
111           'variables': {
112             'filters': [
113               # Run net_unittests first to avoid random failures due to slow python startup
114               # KeygenHandlerTest.SmokeTest and KeygenHandlerTest.ConcurrencyTest fail due to
115               # readonly certdb (b/8153161)
116               # URLRequestTestHTTP.GetTest_ManyCookies takes roughly 55s to run. Increase
117               # timeout to 75s from 45s to allow it to pass (b/19821476)
118               # ProxyScriptFetcherImplTest.HttpMimeType is flaking (b/19848784)
119              'net_unittests --gtest_filter=-KeygenHandlerTest.SmokeTest:KeygenHandlerTest.ConcurrencyTest:ProxyScriptFetcherImplTest.HttpMimeType --test-launcher-timeout=75000',
120               # Disable ProcessMetricsTest.GetNumberOfThreads (b/15610509)
121               # Disable ProcessUtilTest.* (need to define OS_ANDROID)
122               # Disable StackContainer.BufferAlignment (don't support 16-byte alignment)
123               # Disable SystemMetrics2Test.GetSystemMemoryInfo (buffers>0 can't be guaranteed)
124               'base_unittests --gtest_filter=-ProcessMetricsTest.GetNumberOfThreads:ProcessUtilTest.*:StackContainer.BufferAlignment:SystemMetrics2Test.GetSystemMemoryInfo',
125               # DesktopCaptureDeviceTest.*: No capture device on Eureka
126               # Disable PepperGamepadHostTest.WaitForReply (pepper not supported on Eureka)
127               # Disable GpuDataManagerImplPrivateTest.SetGLStrings and
128               # RenderWidgetHostTest.Background because we disable the blacklist to enable WebGL (b/16142554)
129               'content_unittests --gtest_filter=-DOMStorageDatabaseTest.TestCanOpenAndReadWebCoreDatabase:DesktopCaptureDeviceTest.Capture:GamepadProviderTest.PollingAccess:GpuDataManagerImplPrivateTest.SetGLStrings:PepperGamepadHostTest.WaitForReply:RenderWidgetHostTest.Background',
130               # Disable VP9 related tests (b/18593324)
131               #   PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM
132               #   PipelineIntegrationTest.BasicPlayback_VideoOnly_VP9_WebM
133               #   PipelineIntegrationTest.BasicPlayback_VP9*
134               #   PipelineIntegrationTest.P444_VP9_WebM
135               # Disable VP8A tests (b/18593324)
136               #   PipelineIntegrationTest.BasicPlayback_VP8A*
137               # Disable OpusAudioDecoderTest/AudioDecoderTest.ProduceAudioSamples/0 (unit
138               # test fails when Opus decoder uses fixed-point)
139               # Due to b/16456550, disable the following four test cases:
140               #   AudioOutputControllerTest.PlayDivertSwitchDeviceRevertClose
141               #   AudioOutputControllerTest.PlaySwitchDeviceClose
142               #   AudioStreamHandlerTest.Play
143               #   SoundsManagerTest.Play
144               # Disable AudioStreamHandlerTest.ConsecutivePlayRequests (b/16539293)
145               'media_unittests --gtest_filter=-AudioOutputControllerTest.PlayDivertSwitchDeviceRevertClose:AudioOutputControllerTest.PlaySwitchDeviceClose:AudioStreamHandlerTest.Play:AudioStreamHandlerTest.ConsecutivePlayRequests:PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM:PipelineIntegrationTest.BasicPlayback_VideoOnly_VP9_WebM:PipelineIntegrationTest.BasicPlayback_VP9*:PipelineIntegrationTest.P444_VP9_WebM:PipelineIntegrationTest.BasicPlayback_VP8A*:OpusAudioDecoderTest/AudioDecoderTest.ProduceAudioSamples/0:SoundsManagerTest.Play',
146               'sync_unit_tests --gtest_filter=-SyncHttpBridgeTest.*',
147               # DoAppendUTF8Invalid fails because of dcheck_always_on flag in Eng builds
148               'url_unittests --gtest_filter=-URLCanonTest.DoAppendUTF8Invalid',
149             ],
150           },
151         }, { # else "x86" or "android"
152           'variables': {
153             'filters': [
154               # Disable PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM (not supported)
155               'media_unittests --gtest_filter=-PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM',
156             ],
157           }
158         }],
159         ['disable_display==0', {
160           'dependencies': [
161             '../gpu/gpu.gyp:gpu_unittests',
162           ],
163         }],
164         ['OS!="android"', {
165           'dependencies': [
166             'cast_shell_unittests',
167             'cast_shell_browser_test',
168             'media/media.gyp:cast_media_unittests',
169           ],
170           'variables': {
171             'filters': [
172               'cast_shell_browser_test --no-sandbox --disable-gpu',
173             ],
174           },
175         }],
176         ['disable_display==1', {
177           'variables': {
178             'filters': [
179               # These are not supported by the backend right now. b/21737919
180               'cast_media_unittests --gtest_filter=-AudioVideoPipelineDeviceTest.VorbisPlayback:AudioVideoPipelineDeviceTest.WebmPlayback',
181             ],
182           }
183         }],
184         ['enable_plugins==1', {
185           'dependencies': [
186             '../ppapi/ppapi_internal.gyp:ppapi_unittests',
187           ],
188         }],
189       ],
190       'includes': ['build/tests/test_list.gypi'],
191     },
192     {
193       'target_name': 'cast_metrics_test_support',
194       'type': '<(component)',
195       'dependencies': [
196         'cast_base',
197       ],
198       'sources': [
199         'base/metrics/cast_metrics_test_helper.cc',
200         'base/metrics/cast_metrics_test_helper.h',
201       ],
202     },  # end of target 'cast_metrics_test_support'
203   ],  # end of targets
204   'conditions': [
205     ['OS=="android"', {
206       'targets': [
207         {
208           'target_name': 'cast_base_unittests_apk',
209           'type': 'none',
210           'dependencies': [
211             'cast_base_unittests',
212           ],
213           'variables': {
214             'test_suite_name': 'cast_base_unittests',
215           },
216           'includes': ['../build/apk_test.gypi'],
217         },  # end of target 'cast_base_unittests_apk'
218         {
219           'target_name': 'cast_crash_unittests_apk',
220           'type': 'none',
221           'dependencies': [
222             'cast_crash_unittests',
223           ],
224           'variables': {
225             'test_suite_name': 'cast_crash_unittests',
226           },
227           'includes': ['../build/apk_test.gypi'],
228         },  # end of target 'cast_crash_unittests_apk'
229         {
230           'target_name': 'cast_android_tests',
231           'type': 'none',
232           'dependencies': ['cast_android_tests_generator'],
233           'conditions': [
234             ['chromecast_branding!="public"', {
235               'dependencies': [
236                 'internal/chromecast_internal.gyp:cast_android_tests_internal',
237               ],
238             }],
239           ],
240         },  # end of target 'cast_android_tests',
241         {
242           'target_name': 'cast_android_tests_generator',
243           'type': 'none',
244           'variables': {
245             'filters': [
246               # LayerTreeHost has dozens of separate crashing test cases on Fugu. (b/22512618)
247               'cc_unittests_apk --gtest_filter=*:-LayerTreeHost*',
248               # The following tests all crash on fugu.
249               'gfx_unittests_apk --gtest_filter=*:-FontListTest.Fonts_DeriveWithHeightUpperBound',
250               'media_unittests_apk --gtest_filter=*-AudioInputTest.*:AudioAndroidInputTest*',
251             ],
252           },
253           'dependencies': [
254             'cast_base_unittests_apk',
255             'cast_crash_unittests_apk',
256             '../base/base.gyp:base_unittests_apk',
257             '../cc/cc_tests.gyp:cc_unittests_apk',
258             '../ipc/ipc.gyp:ipc_tests_apk',
259             '../media/media.gyp:media_unittests_apk',
260             '../media/midi/midi.gyp:midi_unittests_apk',
261             '../net/net.gyp:net_unittests_apk',
262             # Note(gunsch): crashes 100% on Fugu. b/22489355
263             # '../sandbox/sandbox.gyp:sandbox_linux_jni_unittests_apk',
264             '../sql/sql.gyp:sql_unittests_apk',
265             '../sync/sync.gyp:sync_unit_tests_apk',
266             '../ui/events/events.gyp:events_unittests_apk',
267             '../ui/gfx/gfx_tests.gyp:gfx_unittests_apk',
268           ],
269           'includes': ['build/tests/test_list.gypi'],
270         },  # end of target 'cast_android_tests_generator'
271         {
272           'target_name': 'cast_android_test_lists',
273           'type': 'none',
274           'dependencies': [
275             'cast_android_tests',
276           ],
277           'variables': {
278             'test_generator_py': '<(DEPTH)/chromecast/tools/build/generate_test_lists.py',
279             'test_inputs_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast/tests',
280           },
281           'actions': [
282             {
283               'action_name': 'generate_combined_test_build_list',
284               'message': 'Generating combined test build list',
285               'inputs': ['<(test_generator_py)'],
286               'outputs': ['<(PRODUCT_DIR)/tests/build_test_list_android.txt'],
287               'action': [
288                 'python', '<(test_generator_py)',
289                 '-t', '<(test_inputs_dir)',
290                 '-o', '<@(_outputs)',
291                 'pack_build',
292               ],
293             },
294             {
295               'action_name': 'generate_combined_test_run_list',
296               'message': 'Generating combined test run list',
297               'inputs': ['<(test_generator_py)'],
298               'outputs': ['<(PRODUCT_DIR)/tests/run_test_list.txt'],
299               'action': [
300                 'python', '<(test_generator_py)',
301                 '-t', '<(test_inputs_dir)',
302                 '-o', '<@(_outputs)',
303                 'pack_run',
304               ],
305             }
306           ],
307         },
308       ],  # end of targets
309     }, {  # OS!="android"
310       'targets': [
311         {
312           'target_name': 'cast_shell_test_support',
313           'type': '<(component)',
314           'defines': [
315             'HAS_OUT_OF_PROC_TEST_RUNNER',
316           ],
317           'dependencies': [
318             'cast_shell_core',
319             '../content/content_shell_and_tests.gyp:content_browser_test_support',
320             '../testing/gtest.gyp:gtest',
321             '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
322           ],
323           'sources': [
324             'browser/test/chromecast_browser_test.cc',
325             'browser/test/chromecast_browser_test.h',
326             'browser/test/chromecast_browser_test_runner.cc',
327           ],
328         },  # end of target 'cast_shell_test_support'
329         {
330           'target_name': 'cast_shell_browser_test',
331           'type': '<(gtest_target_type)',
332           'dependencies': [
333             'cast_shell_test_support',
334             '../testing/gtest.gyp:gtest',
335           ],
336           'defines': [
337             'HAS_OUT_OF_PROC_TEST_RUNNER',
338           ],
339           'sources': [
340             'browser/test/chromecast_shell_browser_test.cc',
341           ],
342         },
343         {
344           'target_name': 'cast_shell_unittests',
345           'type': '<(gtest_target_type)',
346           'dependencies': [
347             'cast_crash_test_support',
348             'chromecast.gyp:cast_crash_client',
349             '../base/base.gyp:run_all_unittests',
350             '../testing/gtest.gyp:gtest',
351           ],
352           'sources': [
353             'app/linux/cast_crash_reporter_client_unittest.cc',
354           ],
355         },  # end of cast_shell_unittests
356         # Builds all tests and the output lists of build/run targets for those tests.
357         # Note: producing a predetermined list of dependent inputs on which to
358         # regenerate this output is difficult with GYP. This file is not
359         # guaranteed to be regenerated outside of a clean build.
360         {
361           'target_name': 'cast_test_lists',
362           'type': 'none',
363           'dependencies': [
364             'cast_tests',
365           ],
366           'variables': {
367             'test_generator_py': '<(DEPTH)/chromecast/tools/build/generate_test_lists.py',
368             'test_inputs_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast/tests',
369             'test_additional_options': '--ozone-platform=test'
370           },
371           'actions': [
372             {
373               'action_name': 'generate_combined_test_build_list',
374               'message': 'Generating combined test build list',
375               'inputs': ['<(test_generator_py)'],
376               'outputs': ['<(PRODUCT_DIR)/tests/build_test_list.txt'],
377               'action': [
378                 'python', '<(test_generator_py)',
379                 '-t', '<(test_inputs_dir)',
380                 '-o', '<@(_outputs)',
381                 'pack_build',
382               ],
383             },
384             {
385               'action_name': 'generate_combined_test_run_list',
386               'message': 'Generating combined test run list',
387               'inputs': ['<(test_generator_py)'],
388               'outputs': ['<(PRODUCT_DIR)/tests/run_test_list.txt'],
389               'action': [
390                 'python', '<(test_generator_py)',
391                 '-t', '<(test_inputs_dir)',
392                 '-o', '<@(_outputs)',
393                 '-a', '<(test_additional_options)',
394                 'pack_run',
395               ],
396             }
397           ],
398         },
399       ],  # end of targets
400     }],
401   ],  # end of conditions