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