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