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