Include all dupe types (event when value is zero) in scan stats.
[chromium-blink-merge.git] / chromecast / chromecast_tests.gypi
blob5f9aa93921bd7c3da7ab0282d5c04585520ebd31
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       ],
126       'includes': ['build/tests/test_list.gypi'],
127     },
128     # Builds all tests and the output lists of build/run targets for those tests.
129     # Note: producing a predetermined list of dependent inputs on which to
130     # regenerate this output is difficult with GYP. This file is not
131     # guaranteed to be regenerated outside of a clean build.
132     {
133       'target_name': 'cast_test_lists',
134       'type': 'none',
135       'dependencies': [
136         'cast_tests',
137       ],
138       'variables': {
139         'test_generator_py': '<(DEPTH)/chromecast/tools/build/generate_test_lists.py',
140         'test_inputs_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast/tests',
141         'test_additional_options': '--ozone-platform=test'
142       },
143       'actions': [
144         {
145           'action_name': 'generate_combined_test_build_list',
146           'message': 'Generating combined test build list',
147           'inputs': ['<(test_generator_py)'],
148           'outputs': ['<(PRODUCT_DIR)/tests/build_test_list.txt'],
149           'action': [
150             'python', '<(test_generator_py)',
151             '-t', '<(test_inputs_dir)',
152             '-o', '<@(_outputs)',
153             'pack_build',
154           ],
155         },
156         {
157           'action_name': 'generate_combined_test_run_list',
158           'message': 'Generating combined test run list',
159           'inputs': ['<(test_generator_py)'],
160           'outputs': ['<(PRODUCT_DIR)/tests/run_test_list.txt'],
161           'action': [
162             'python', '<(test_generator_py)',
163             '-t', '<(test_inputs_dir)',
164             '-o', '<@(_outputs)',
165             '-a', '<(test_additional_options)',
166             'pack_run',
167           ],
168         }
169       ],
170     },
171     {
172       'target_name': 'cast_metrics_test_support',
173       'type': '<(component)',
174       'dependencies': [
175         'cast_base',
176       ],
177       'sources': [
178         'base/metrics/cast_metrics_test_helper.cc',
179         'base/metrics/cast_metrics_test_helper.h',
180       ],
181     },  # end of target 'cast_metrics_test_support'
182   ],  # end of targets
183   'conditions': [
184     ['OS=="android"', {
185       'targets': [
186         {
187           'target_name': 'cast_android_tests',
188           'type': 'none',
189           'dependencies': [
190             '../base/base.gyp:base_unittests_apk',
191             '../cc/cc_tests.gyp:cc_unittests_apk',
192             '../ipc/ipc.gyp:ipc_tests_apk',
193             '../media/media.gyp:media_unittests_apk',
194             '../media/midi/midi.gyp:midi_unittests_apk',
195             '../net/net.gyp:net_unittests_apk',
196             '../sandbox/sandbox.gyp:sandbox_linux_jni_unittests_apk',
197             '../sql/sql.gyp:sql_unittests_apk',
198             '../sync/sync.gyp:sync_unit_tests_apk',
199             '../ui/events/events.gyp:events_unittests_apk',
200             '../ui/gfx/gfx_tests.gyp:gfx_unittests_apk',
201           ],
202           'includes': ['build/tests/test_list.gypi'],
203         },
204         {
205           'target_name': 'cast_android_test_lists',
206           'type': 'none',
207           'dependencies': [
208             'cast_android_tests',
209           ],
210           'variables': {
211             'test_generator_py': '<(DEPTH)/chromecast/tools/build/generate_test_lists.py',
212             'test_inputs_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast/tests',
213           },
214           'actions': [
215             {
216               'action_name': 'generate_combined_test_build_list',
217               'message': 'Generating combined test build list',
218               'inputs': ['<(test_generator_py)'],
219               'outputs': ['<(PRODUCT_DIR)/tests/build_test_list_android.txt'],
220               'action': [
221                 'python', '<(test_generator_py)',
222                 '-t', '<(test_inputs_dir)',
223                 '-o', '<@(_outputs)',
224                 'pack_build',
225               ],
226             },
227           ],
228         },
229       ],  # end of targets
230     }, {  # OS!="android"
231       'targets': [
232         {
233           'target_name': 'cast_shell_test_support',
234           'type': '<(component)',
235           'defines': [
236             'HAS_OUT_OF_PROC_TEST_RUNNER',
237           ],
238           'dependencies': [
239             'cast_shell_core',
240             '../content/content_shell_and_tests.gyp:content_browser_test_support',
241             '../testing/gtest.gyp:gtest',
242             '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings',
243           ],
244           'sources': [
245             'browser/test/chromecast_browser_test.cc',
246             'browser/test/chromecast_browser_test.h',
247             'browser/test/chromecast_browser_test_runner.cc',
248           ],
249         },  # end of target 'cast_shell_test_support'
250         {
251           'target_name': 'cast_shell_browser_test',
252           'type': '<(gtest_target_type)',
253           'dependencies': [
254             'cast_shell_test_support',
255             '../testing/gtest.gyp:gtest',
256           ],
257           'defines': [
258             'HAS_OUT_OF_PROC_TEST_RUNNER',
259           ],
260           'sources': [
261             'browser/test/chromecast_shell_browser_test.cc',
262           ],
263         },
264       ],  # end of targets
265     }],
266   ],  # end of conditions