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