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