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