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