Prevent TouchEvent Crash on X
[chromium-blink-merge.git] / chromecast / chromecast_tests.gypi
blob090943086972fbcf73478aa45eeda66176e36bb7
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   'targets': [
7     {
8       'target_name': 'cast_tests',
9       'type': 'none',
10       'dependencies': [
11         'cast_test_generator',
12       ],
13       'conditions': [
14         ['chromecast_branding=="Chrome"', {
15           'dependencies': [
16             '<(cast_internal_gyp):cast_tests_internal',
17           ],
18         }],
19       ],
20     },
21     # This target only depends on targets that generate test binaries.
22     {
23       'target_name': 'cast_test_generator',
24       'type': 'none',
25       'dependencies': [
26         'media/media.gyp:cast_media_unittests',
27         '../base/base.gyp:base_unittests',
28         '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests',
29         '../content/content_shell_and_tests.gyp:content_unittests',
30         '../crypto/crypto.gyp:crypto_unittests',
31         '../ipc/ipc.gyp:ipc_tests',
32         '../jingle/jingle.gyp:jingle_unittests',
33         '../media/media.gyp:media_unittests',
34         '../net/net.gyp:net_unittests',
35         '../sandbox/sandbox.gyp:sandbox_linux_unittests',
36         '../sql/sql.gyp:sql_unittests',
37         '../sync/sync.gyp:sync_unit_tests',
38         '../ui/base/ui_base_tests.gyp:ui_base_unittests',
39         '../url/url.gyp:url_unittests',
40       ],
41       'conditions': [
42         ['target_arch=="arm" and OS!="android"', {
43           'variables': {
44             'filters': [
45               # Run net_unittests first to avoid random failures due to slow python startup
46               # KeygenHandlerTest.SmokeTest and KeygenHandlerTest.ConcurrencyTest fail due to
47               # readonly certdb (b/8153161)
48              'net_unittests --gtest_filter=-KeygenHandlerTest.SmokeTest:KeygenHandlerTest.ConcurrencyTest',
49               # Disable OutOfMemoryDeathTest.ViaSharedLibraries due to gTrusty eglibc incompatibility (crbug/428211)
50               # Disable ProcessMetricsTest.GetNumberOfThreads (b/15610509)
51               # Disable ProcessUtilTest.* (need to define OS_ANDROID)
52               # Disable StackContainer.BufferAlignment (don't support 16-byte alignment)
53               # Disable SystemMetrics2Test.GetSystemMemoryInfo (buffers>0 can't be guaranteed)
54               'base_unittests --gtest_filter=-OutOfMemoryDeathTest.ViaSharedLibraries:ProcessMetricsTest.GetNumberOfThreads:ProcessUtilTest.*:StackContainer.BufferAlignment:SystemMetrics2Test.GetSystemMemoryInfo',
55               # DesktopCaptureDeviceTest.*: No capture device on Eureka
56               # Disable PepperGamepadHostTest.WaitForReply (pepper not supported on Eureka)
57               # Disable GpuDataManagerImplPrivateTest.SetGLStrings and
58               # RenderWidgetHostTest.Background because we disable the blacklist to enable WebGL (b/16142554)
59               'content_unittests --gtest_filter=-DOMStorageDatabaseTest.TestCanOpenAndReadWebCoreDatabase:DesktopCaptureDeviceTest.Capture:GamepadProviderTest.PollingAccess:GpuDataManagerImplPrivateTest.SetGLStrings:PepperGamepadHostTest.WaitForReply:RenderWidgetHostTest.Background',
60               # Disable VP9 related tests (b/18593324)
61               #   PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM
62               #   PipelineIntegrationTest.BasicPlayback_VideoOnly_VP9_WebM
63               #   PipelineIntegrationTest.BasicPlayback_VP9*
64               #   PipelineIntegrationTest.P444_VP9_WebM
65               # Disable VP8A tests (b/18593324)
66               #   PipelineIntegrationTest.BasicPlayback_VP8A*
67               # Disable OpusAudioDecoderTest/AudioDecoderTest.ProduceAudioSamples/0 (unit
68               # test fails when Opus decoder uses fixed-point)
69               # Due to b/16456550, disable the following four test cases:
70               #   AudioOutputControllerTest.PlayDivertSwitchDeviceRevertClose
71               #   AudioOutputControllerTest.PlaySwitchDeviceClose
72               #   AudioStreamHandlerTest.Play
73               #   SoundsManagerTest.Play
74               # Disable AudioStreamHandlerTest.ConsecutivePlayRequests (b/16539293)
75               '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',
76               'sync_unit_tests --gtest_filter=-SyncHttpBridgeTest.*',
77               # DoAppendUTF8Invalid fails because of dcheck_always_on flag in Eng builds
78               'url_unittests --gtest_filter=-URLCanonTest.DoAppendUTF8Invalid',
79             ],
80           },
81         }, { # else "x86" or "android"
82           'variables': {
83             'filters': [
84               # Disable OutOfMemoryDeathTest.ViaSharedLibraries due to gTrusty eglibc incompatibility
85               # See: crbug/428211
86               'base_unittests --gtest_filter=-OutOfMemoryDeathTest.ViaSharedLibraries',
87               # Disable PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM (not supported)
88               'media_unittests --gtest_filter=-PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM',
89             ],
90           }
91         }],
92         ['disable_display==0', {
93           'dependencies': [
94             '../gpu/gpu.gyp:gpu_unittests',
95           ],
96         }],
97         ['OS!="android"', {
98           'dependencies': [
99             'cast_shell_browser_test',
100           ],
101           'variables': {
102             'filters': [
103               'cast_shell_browser_test --no-sandbox --disable-gpu',
104             ],
105           },
106         }],
107       ],
108       'includes': ['build/tests/test_list.gypi'],
109     },
110     # Builds all tests and the output lists of build/run targets for those tests.
111     # Note: producing a predetermined list of dependent inputs on which to
112     # regenerate this output is difficult with GYP. This file is not
113     # guaranteed to be regenerated outside of a clean build.
114     {
115       'target_name': 'cast_test_lists',
116       'type': 'none',
117       'dependencies': [
118         'cast_tests',
119       ],
120       'variables': {
121         'test_generator_py': '<(DEPTH)/chromecast/tools/build/generate_test_lists.py',
122         'test_inputs_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast/tests',
123         'test_additional_options': '--ozone-platform=test'
124       },
125       'actions': [
126         {
127           'action_name': 'generate_combined_test_build_list',
128           'message': 'Generating combined test build list',
129           'inputs': ['<(test_generator_py)'],
130           'outputs': ['<(PRODUCT_DIR)/tests/build_test_list.txt'],
131           'action': [
132             'python', '<(test_generator_py)',
133             '-t', '<(test_inputs_dir)',
134             '-o', '<@(_outputs)',
135             'pack_build',
136           ],
137         },
138         {
139           'action_name': 'generate_combined_test_run_list',
140           'message': 'Generating combined test run list',
141           'inputs': ['<(test_generator_py)'],
142           'outputs': ['<(PRODUCT_DIR)/tests/run_test_list.txt'],
143           'action': [
144             'python', '<(test_generator_py)',
145             '-t', '<(test_inputs_dir)',
146             '-o', '<@(_outputs)',
147             '-a', '<(test_additional_options)',
148             'pack_run',
149           ],
150         }
151       ],
152     },
153     {
154       'target_name': 'cast_metrics_test_support',
155       'type': '<(component)',
156       'dependencies': [
157         'cast_base',
158       ],
159       'sources': [
160         'base/metrics/cast_metrics_test_helper.cc',
161         'base/metrics/cast_metrics_test_helper.h',
162       ],
163     },  # end of target 'cast_metrics_test_support'
164   ],  # end of targets
165   'conditions': [
166     ['OS=="android"', {
167       'targets': [
168         {
169           'target_name': 'cast_android_tests',
170           'type': 'none',
171           'dependencies': [
172             '../base/base.gyp:base_unittests_apk',
173             '../cc/cc_tests.gyp:cc_unittests_apk',
174             '../ipc/ipc.gyp:ipc_tests_apk',
175             '../media/media.gyp:media_unittests_apk',
176             '../net/net.gyp:net_unittests_apk',
177             '../sandbox/sandbox.gyp:sandbox_linux_jni_unittests_apk',
178             '../sql/sql.gyp:sql_unittests_apk',
179             '../sync/sync.gyp:sync_unit_tests_apk',
180             '../ui/events/events.gyp:events_unittests_apk',
181             '../ui/gfx/gfx_tests.gyp:gfx_unittests_apk',
182           ],
183           'includes': ['build/tests/test_list.gypi'],
184         },
185         {
186           'target_name': 'cast_android_test_lists',
187           'type': 'none',
188           'dependencies': [
189             'cast_android_tests',
190           ],
191           'variables': {
192             'test_generator_py': '<(DEPTH)/chromecast/tools/build/generate_test_lists.py',
193             'test_inputs_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast/tests',
194           },
195           'actions': [
196             {
197               'action_name': 'generate_combined_test_build_list',
198               'message': 'Generating combined test build list',
199               'inputs': ['<(test_generator_py)'],
200               'outputs': ['<(PRODUCT_DIR)/tests/build_test_list_android.txt'],
201               'action': [
202                 'python', '<(test_generator_py)',
203                 '-t', '<(test_inputs_dir)',
204                 '-o', '<@(_outputs)',
205                 'pack_build',
206               ],
207             },
208           ],
209         },
210       ],  # end of targets
211     }, {  # OS!="android"
212       'targets': [
213         {
214           'target_name': 'cast_shell_test_support',
215           'type': '<(component)',
216           'defines': [
217             'HAS_OUT_OF_PROC_TEST_RUNNER',
218           ],
219           'dependencies': [
220             'cast_shell_core',
221             '../content/content_shell_and_tests.gyp:content_browser_test_support',
222             '../testing/gtest.gyp:gtest',
223             '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
224           ],
225           'sources': [
226             'browser/test/chromecast_browser_test.cc',
227             'browser/test/chromecast_browser_test.h',
228             'browser/test/chromecast_browser_test_runner.cc',
229           ],
230         },  # end of target 'cast_shell_test_support'
231         {
232           'target_name': 'cast_shell_browser_test',
233           'type': '<(gtest_target_type)',
234           'dependencies': [
235             'cast_shell_test_support',
236             '../testing/gtest.gyp:gtest',
237           ],
238           'defines': [
239             'HAS_OUT_OF_PROC_TEST_RUNNER',
240           ],
241           'sources': [
242             'browser/test/chromecast_shell_browser_test.cc',
243           ],
244         },
245       ],  # end of targets
246     }],
247   ],  # end of conditions