Roll src/third_party/skia ac856c9:b6bf367
[chromium-blink-merge.git] / chromecast / chromecast_tests.gypi
blobaeec2db7109e5458a659b42b5e690a108502d895
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 90s from 45s to allow it to pass (b/19821476)
118               # ProxyScriptFetcherImplTest.HttpMimeType is flaking (b/19848784)
119               # Running a batch of net_unittests has high overhead. Run tests in batches of 25 to reduce number of batches (b/23156294).
120              'net_unittests --gtest_filter=-KeygenHandlerTest.SmokeTest:KeygenHandlerTest.ConcurrencyTest:ProxyScriptFetcherImplTest.HttpMimeType --test-launcher-timeout=90000 --test-launcher-batch-limit=25',
121               # Disable ProcessMetricsTest.GetNumberOfThreads (b/15610509)
122               # Disable ProcessUtilTest.* (need to define OS_ANDROID)
123               # Disable StackContainer.BufferAlignment (don't support 16-byte alignment)
124               # Disable SystemMetrics2Test.GetSystemMemoryInfo (buffers>0 can't be guaranteed)
125               'base_unittests --gtest_filter=-ProcessMetricsTest.GetNumberOfThreads:ProcessUtilTest.*:StackContainer.BufferAlignment:SystemMetrics2Test.GetSystemMemoryInfo',
126               # DesktopCaptureDeviceTest.*: No capture device on Eureka
127               # Disable PepperGamepadHostTest.WaitForReply (pepper not supported on Eureka)
128               # Disable GpuDataManagerImplPrivateTest.SetGLStrings and
129               # RenderWidgetHostTest.Background because we disable the blacklist to enable WebGL (b/16142554)
130               'content_unittests --gtest_filter=-DOMStorageDatabaseTest.TestCanOpenAndReadWebCoreDatabase:DesktopCaptureDeviceTest.Capture:GamepadProviderTest.PollingAccess:GpuDataManagerImplPrivateTest.SetGLStrings:PepperGamepadHostTest.WaitForReply:RenderWidgetHostTest.Background',
131               # Disable VP9 related tests (b/18593324)
132               #   PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM
133               #   PipelineIntegrationTest.BasicPlayback_VideoOnly_VP9_WebM
134               #   PipelineIntegrationTest.BasicPlayback_VP9*
135               #   PipelineIntegrationTest.P444_VP9_WebM
136               # Disable VP8A tests (b/18593324)
137               #   PipelineIntegrationTest.BasicPlayback_VP8A*
138               # Disable OpusAudioDecoderTest/AudioDecoderTest.ProduceAudioSamples/0 (unit
139               # test fails when Opus decoder uses fixed-point)
140               # Due to b/16456550, disable the following four test cases:
141               #   AudioOutputControllerTest.PlayDivertSwitchDeviceRevertClose
142               #   AudioOutputControllerTest.PlaySwitchDeviceClose
143               #   AudioStreamHandlerTest.Play
144               #   SoundsManagerTest.Play
145               # Disable AudioStreamHandlerTest.ConsecutivePlayRequests (b/16539293)
146               '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',
147               'sync_unit_tests --gtest_filter=-SyncHttpBridgeTest.*',
148               # DoAppendUTF8Invalid fails because of dcheck_always_on flag in Eng builds
149               'url_unittests --gtest_filter=-URLCanonTest.DoAppendUTF8Invalid',
150             ],
151           },
152         }, { # else "x86" or "android"
153           'variables': {
154             'filters': [
155               # Disable PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM (not supported)
156               'media_unittests --gtest_filter=-PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM',
157             ],
158           }
159         }],
160         ['disable_display==0', {
161           'dependencies': [
162             '../gpu/gpu.gyp:gpu_unittests',
163           ],
164         }],
165         ['OS!="android"', {
166           'dependencies': [
167             'cast_shell_unittests',
168             'cast_shell_browser_test',
169             'media/media.gyp:cast_media_unittests',
170           ],
171           'variables': {
172             'filters': [
173               'cast_shell_browser_test --no-sandbox --disable-gpu',
174             ],
175           },
176         }],
177         ['disable_display==1', {
178           'variables': {
179             'filters': [
180               # These are not supported by the backend right now. b/21737919
181               'cast_media_unittests --gtest_filter=-AudioVideoPipelineDeviceTest.VorbisPlayback:AudioVideoPipelineDeviceTest.WebmPlayback',
182             ],
183           }
184         }],
185         ['enable_plugins==1', {
186           'dependencies': [
187             '../ppapi/ppapi_internal.gyp:ppapi_unittests',
188           ],
189         }],
190       ],
191       'includes': ['build/tests/test_list.gypi'],
192     },
193     {
194       'target_name': 'cast_metrics_test_support',
195       'type': '<(component)',
196       'dependencies': [
197         'cast_base',
198       ],
199       'sources': [
200         'base/metrics/cast_metrics_test_helper.cc',
201         'base/metrics/cast_metrics_test_helper.h',
202       ],
203     },  # end of target 'cast_metrics_test_support'
204   ],  # end of targets
205   'conditions': [
206     ['OS=="android"', {
207       'targets': [
208         {
209           'target_name': 'cast_base_unittests_apk',
210           'type': 'none',
211           'dependencies': [
212             'cast_base_unittests',
213           ],
214           'variables': {
215             'test_suite_name': 'cast_base_unittests',
216           },
217           'includes': ['../build/apk_test.gypi'],
218         },  # end of target 'cast_base_unittests_apk'
219         {
220           'target_name': 'cast_crash_unittests_apk',
221           'type': 'none',
222           'dependencies': [
223             'cast_crash_unittests',
224           ],
225           'variables': {
226             'test_suite_name': 'cast_crash_unittests',
227           },
228           'includes': ['../build/apk_test.gypi'],
229         },  # end of target 'cast_crash_unittests_apk'
230         {
231           'target_name': 'cast_android_tests',
232           'type': 'none',
233           'dependencies': ['cast_android_tests_generator'],
234           'conditions': [
235             ['chromecast_branding!="public"', {
236               'dependencies': [
237                 'internal/chromecast_internal.gyp:cast_android_tests_internal',
238               ],
239             }],
240           ],
241         },  # end of target 'cast_android_tests',
242         {
243           'target_name': 'cast_android_tests_generator',
244           'type': 'none',
245           'variables': {
246             'filters': [
247               # LayerTreeHost has dozens of separate crashing test cases on Fugu. (b/22512618)
248               'cc_unittests_apk --gtest_filter=*:-LayerTreeHost*',
249               # The following tests all crash on fugu.
250               'gfx_unittests_apk --gtest_filter=*:-FontListTest.Fonts_DeriveWithHeightUpperBound',
251               'media_unittests_apk --gtest_filter=*-AudioInputTest.*:AudioAndroidInputTest*',
252             ],
253           },
254           'dependencies': [
255             'cast_base_unittests_apk',
256             'cast_crash_unittests_apk',
257             '../base/base.gyp:base_unittests_apk',
258             '../cc/cc_tests.gyp:cc_unittests_apk',
259             '../ipc/ipc.gyp:ipc_tests_apk',
260             '../media/media.gyp:media_unittests_apk',
261             '../media/midi/midi.gyp:midi_unittests_apk',
262             '../net/net.gyp:net_unittests_apk',
263             # Note(gunsch): crashes 100% on Fugu. b/22489355
264             # '../sandbox/sandbox.gyp:sandbox_linux_jni_unittests_apk',
265             '../sql/sql.gyp:sql_unittests_apk',
266             '../sync/sync.gyp:sync_unit_tests_apk',
267             '../ui/events/events.gyp:events_unittests_apk',
268             '../ui/gfx/gfx_tests.gyp:gfx_unittests_apk',
269           ],
270           'includes': ['build/tests/test_list.gypi'],
271         },  # end of target 'cast_android_tests_generator'
272         {
273           'target_name': 'cast_android_test_lists',
274           'type': 'none',
275           'dependencies': [
276             'cast_android_tests',
277           ],
278           'variables': {
279             'test_generator_py': '<(DEPTH)/chromecast/tools/build/generate_test_lists.py',
280             'test_inputs_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast/tests',
281           },
282           'actions': [
283             {
284               'action_name': 'generate_combined_test_build_list',
285               'message': 'Generating combined test build list',
286               'inputs': ['<(test_generator_py)'],
287               'outputs': ['<(PRODUCT_DIR)/tests/build_test_list_android.txt'],
288               'action': [
289                 'python', '<(test_generator_py)',
290                 '-t', '<(test_inputs_dir)',
291                 '-o', '<@(_outputs)',
292                 'pack_build',
293               ],
294             },
295             {
296               'action_name': 'generate_combined_test_run_list',
297               'message': 'Generating combined test run list',
298               'inputs': ['<(test_generator_py)'],
299               'outputs': ['<(PRODUCT_DIR)/tests/run_test_list.txt'],
300               'action': [
301                 'python', '<(test_generator_py)',
302                 '-t', '<(test_inputs_dir)',
303                 '-o', '<@(_outputs)',
304                 'pack_run',
305               ],
306             }
307           ],
308         },
309       ],  # end of targets
310     }, {  # OS!="android"
311       'targets': [
312         {
313           'target_name': 'cast_shell_test_support',
314           'type': '<(component)',
315           'defines': [
316             'HAS_OUT_OF_PROC_TEST_RUNNER',
317           ],
318           'dependencies': [
319             'cast_shell_core',
320             '../content/content_shell_and_tests.gyp:content_browser_test_support',
321             '../testing/gtest.gyp:gtest',
322             '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
323           ],
324           'sources': [
325             'browser/test/chromecast_browser_test.cc',
326             'browser/test/chromecast_browser_test.h',
327             'browser/test/chromecast_browser_test_runner.cc',
328           ],
329         },  # end of target 'cast_shell_test_support'
330         {
331           'target_name': 'cast_shell_browser_test',
332           'type': '<(gtest_target_type)',
333           'dependencies': [
334             'cast_shell_test_support',
335             '../testing/gtest.gyp:gtest',
336           ],
337           'defines': [
338             'HAS_OUT_OF_PROC_TEST_RUNNER',
339           ],
340           'sources': [
341             'browser/test/chromecast_shell_browser_test.cc',
342           ],
343         },
344         {
345           'target_name': 'cast_shell_unittests',
346           'type': '<(gtest_target_type)',
347           'dependencies': [
348             'cast_crash_test_support',
349             'chromecast.gyp:cast_crash_client',
350             '../base/base.gyp:run_all_unittests',
351             '../testing/gtest.gyp:gtest',
352           ],
353           'sources': [
354             'app/linux/cast_crash_reporter_client_unittest.cc',
355           ],
356         },  # end of cast_shell_unittests
357         # Builds all tests and the output lists of build/run targets for those tests.
358         # Note: producing a predetermined list of dependent inputs on which to
359         # regenerate this output is difficult with GYP. This file is not
360         # guaranteed to be regenerated outside of a clean build.
361         {
362           'target_name': 'cast_test_lists',
363           'type': 'none',
364           'dependencies': [
365             'cast_tests',
366           ],
367           'variables': {
368             'test_generator_py': '<(DEPTH)/chromecast/tools/build/generate_test_lists.py',
369             'test_inputs_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast/tests',
370             'test_additional_options': '--ozone-platform=test'
371           },
372           'actions': [
373             {
374               'action_name': 'generate_combined_test_build_list',
375               'message': 'Generating combined test build list',
376               'inputs': ['<(test_generator_py)'],
377               'outputs': ['<(PRODUCT_DIR)/tests/build_test_list.txt'],
378               'action': [
379                 'python', '<(test_generator_py)',
380                 '-t', '<(test_inputs_dir)',
381                 '-o', '<@(_outputs)',
382                 'pack_build',
383               ],
384             },
385             {
386               'action_name': 'generate_combined_test_run_list',
387               'message': 'Generating combined test run list',
388               'inputs': ['<(test_generator_py)'],
389               'outputs': ['<(PRODUCT_DIR)/tests/run_test_list.txt'],
390               'action': [
391                 'python', '<(test_generator_py)',
392                 '-t', '<(test_inputs_dir)',
393                 '-o', '<@(_outputs)',
394                 '-a', '<(test_additional_options)',
395                 'pack_run',
396               ],
397             }
398           ],
399         },
400       ],  # end of targets
401     }],
402   ],  # end of conditions