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