blob: 3084ad903ab00da08703fdcd459696e0bde2d33b [file] [log] [blame]
gunsch0bf377642014-11-20 03:44:271# 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.
4
5{
slan5cacb5a2015-04-22 00:46:376 'variables': {
slan25bb71f22016-01-06 21:23:557 'chromium_code': 1,
8 'use_alsa%': 0,
slan5cacb5a2015-04-22 00:46:379 },
gunsch0bf377642014-11-20 03:44:2710 'targets': [
11 {
slan5cacb5a2015-04-22 00:46:3712 'target_name': 'cast_base_unittests',
13 'type': '<(gtest_target_type)',
14 'dependencies': [
byungchuld95a7a92015-10-08 22:40:3915 'cast_base',
kmackayfa656b092016-02-04 23:23:5416 'cast_component',
byungchuld95a7a92015-10-08 22:40:3917 'cast_crypto',
gunsch6cedab012015-05-15 17:41:2718 '../base/base.gyp:run_all_unittests',
esumaf8f4a122015-10-12 22:48:3819 '../testing/gmock.gyp:gmock',
slan5cacb5a2015-04-22 00:46:3720 '../testing/gtest.gyp:gtest',
slan5cacb5a2015-04-22 00:46:3721 ],
22 'sources': [
kmackay5ff91072015-12-30 16:48:1823 'base/bind_to_task_runner_unittest.cc',
jywb92b0b2c2016-03-09 01:46:0524 'base/chromecast_switches_unittest.cc',
kmackayfa656b092016-02-04 23:23:5425 'base/component/component_unittest.cc',
esumaf8f4a122015-10-12 22:48:3826 'base/device_capabilities_impl_unittest.cc',
slan77d76ac2015-06-30 21:40:1127 'base/error_codes_unittest.cc',
slane7fc725c2015-05-29 23:05:4328 'base/path_utils_unittest.cc',
29 'base/process_utils_unittest.cc',
slan5cacb5a2015-04-22 00:46:3730 'base/serializers_unittest.cc',
gunschee5a8892015-08-20 20:03:4831 'base/system_time_change_notifier_unittest.cc',
gunsch5ed6d7d2015-08-31 22:56:1932 'crypto/signature_cache_unittest.cc',
slan5cacb5a2015-04-22 00:46:3733 ],
gunsche4a76972015-07-15 00:39:5634 'conditions': [
35 ['OS == "android"', {
36 'dependencies': [
37 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
38 ],
39 }],
40 ],
slanf48fe872015-06-23 19:41:5241 }, # end of cast_base_unittests
42 {
bcf62f62872015-07-29 18:23:5243 'target_name': 'cast_crash_test_support',
44 'type': '<(component)',
45 'dependencies': [
bcf62f62872015-07-29 18:23:5246 'cast_base',
byungchuld95a7a92015-10-08 22:40:3947 'cast_crash',
bcf62f62872015-07-29 18:23:5248 ],
49 'sources': [
50 'crash/linux/crash_testing_utils.cc',
51 'crash/linux/crash_testing_utils.h',
52 ],
53 }, # end of target 'cast_crash_test_support'
54 {
slanf48fe872015-06-23 19:41:5255 'target_name': 'cast_crash_unittests',
56 'type': '<(gtest_target_type)',
57 'dependencies': [
byungchuld95a7a92015-10-08 22:40:3958 'cast_crash',
bcf62f62872015-07-29 18:23:5259 'cast_crash_test_support',
slanf48fe872015-06-23 19:41:5260 '../base/base.gyp:run_all_unittests',
slanf8218ca2015-06-29 18:17:0161 '../testing/gmock.gyp:gmock',
slanf48fe872015-06-23 19:41:5262 '../testing/gtest.gyp:gtest',
63 ],
slanf8218ca2015-06-29 18:17:0164 'include_dirs': [
65 '../breakpad/src',
66 ],
slanf48fe872015-06-23 19:41:5267 'sources': [
slanf8218ca2015-06-29 18:17:0168 'crash/cast_crashdump_uploader_unittest.cc',
slan9c01fbe2015-07-08 16:18:2569 'crash/linux/dummy_minidump_generator_unittest.cc',
slanf48fe872015-06-23 19:41:5270 'crash/linux/dump_info_unittest.cc',
71 'crash/linux/synchronized_minidump_manager_unittest.cc',
72 'crash/linux/minidump_writer_unittest.cc',
73 ],
gunsche4a76972015-07-15 00:39:5674 'conditions': [
75 ['OS == "android"', {
76 'dependencies': [
77 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
78 ],
79 }],
80 ],
slanf48fe872015-06-23 19:41:5281 }, # end of cast_crash_unittests
slan5cacb5a2015-04-22 00:46:3782 {
gunsch0bf377642014-11-20 03:44:2783 'target_name': 'cast_tests',
84 'type': 'none',
85 'dependencies': [
86 'cast_test_generator',
87 ],
88 'conditions': [
yucliu48ba41532015-07-30 21:09:0889 ['chromecast_branding!="public"', {
gunsch0bf377642014-11-20 03:44:2790 'dependencies': [
gunsch25850f1d2015-03-30 19:04:1491 'internal/chromecast_internal.gyp:cast_tests_internal',
gunsch0bf377642014-11-20 03:44:2792 ],
93 }],
94 ],
95 },
96 # This target only depends on targets that generate test binaries.
97 {
98 'target_name': 'cast_test_generator',
99 'type': 'none',
100 'dependencies': [
slan5cacb5a2015-04-22 00:46:37101 'cast_base_unittests',
gunsch0bf377642014-11-20 03:44:27102 '../base/base.gyp:base_unittests',
gunsch0bf377642014-11-20 03:44:27103 '../content/content_shell_and_tests.gyp:content_unittests',
104 '../crypto/crypto.gyp:crypto_unittests',
105 '../ipc/ipc.gyp:ipc_tests',
106 '../jingle/jingle.gyp:jingle_unittests',
107 '../media/media.gyp:media_unittests',
toyoshimc64757792015-04-30 14:52:02108 '../media/midi/midi.gyp:midi_unittests',
gunsch0bf377642014-11-20 03:44:27109 '../net/net.gyp:net_unittests',
slan87db9d12015-10-05 20:37:38110 '../ppapi/ppapi_internal.gyp:ppapi_unittests',
gunsch0bf377642014-11-20 03:44:27111 '../sandbox/sandbox.gyp:sandbox_linux_unittests',
112 '../sql/sql.gyp:sql_unittests',
113 '../sync/sync.gyp:sync_unit_tests',
slan5cacb5a2015-04-22 00:46:37114 '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests',
gunsch0bf377642014-11-20 03:44:27115 '../ui/base/ui_base_tests.gyp:ui_base_unittests',
116 '../url/url.gyp:url_unittests',
117 ],
118 'conditions': [
slan5fcffc492015-12-16 05:08:06119 ['OS=="linux" and is_cast_desktop_build==0', {
wzhong141d6c62015-03-09 23:39:08120 'variables': {
121 'filters': [
122 # Run net_unittests first to avoid random failures due to slow python startup
123 # KeygenHandlerTest.SmokeTest and KeygenHandlerTest.ConcurrencyTest fail due to
124 # readonly certdb (b/8153161)
derekjchow16462782015-03-20 23:42:01125 # URLRequestTestHTTP.GetTest_ManyCookies takes roughly 55s to run. Increase
derekjchow38480fe2015-08-27 23:00:21126 # timeout to 90s from 45s to allow it to pass (b/19821476)
derekjchowc4c495eb2015-03-25 01:17:31127 # ProxyScriptFetcherImplTest.HttpMimeType is flaking (b/19848784)
derekjchow38480fe2015-08-27 23:00:21128 # Running a batch of net_unittests has high overhead. Run tests in batches of 25 to reduce number of batches (b/23156294).
129 'net_unittests --gtest_filter=-KeygenHandlerTest.SmokeTest:KeygenHandlerTest.ConcurrencyTest:ProxyScriptFetcherImplTest.HttpMimeType --test-launcher-timeout=90000 --test-launcher-batch-limit=25',
wzhong141d6c62015-03-09 23:39:08130 # Disable ProcessMetricsTest.GetNumberOfThreads (b/15610509)
131 # Disable ProcessUtilTest.* (need to define OS_ANDROID)
132 # Disable StackContainer.BufferAlignment (don't support 16-byte alignment)
133 # Disable SystemMetrics2Test.GetSystemMemoryInfo (buffers>0 can't be guaranteed)
icoolidgef9c30a52015-04-20 18:16:02134 'base_unittests --gtest_filter=-ProcessMetricsTest.GetNumberOfThreads:ProcessUtilTest.*:StackContainer.BufferAlignment:SystemMetrics2Test.GetSystemMemoryInfo',
wzhong141d6c62015-03-09 23:39:08135 # DesktopCaptureDeviceTest.*: No capture device on Eureka
136 # Disable PepperGamepadHostTest.WaitForReply (pepper not supported on Eureka)
137 # Disable GpuDataManagerImplPrivateTest.SetGLStrings and
138 # RenderWidgetHostTest.Background because we disable the blacklist to enable WebGL (b/16142554)
139 'content_unittests --gtest_filter=-DOMStorageDatabaseTest.TestCanOpenAndReadWebCoreDatabase:DesktopCaptureDeviceTest.Capture:GamepadProviderTest.PollingAccess:GpuDataManagerImplPrivateTest.SetGLStrings:PepperGamepadHostTest.WaitForReply:RenderWidgetHostTest.Background',
140 # Disable VP9 related tests (b/18593324)
141 # PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM
142 # PipelineIntegrationTest.BasicPlayback_VideoOnly_VP9_WebM
143 # PipelineIntegrationTest.BasicPlayback_VP9*
144 # PipelineIntegrationTest.P444_VP9_WebM
145 # Disable VP8A tests (b/18593324)
146 # PipelineIntegrationTest.BasicPlayback_VP8A*
147 # Disable OpusAudioDecoderTest/AudioDecoderTest.ProduceAudioSamples/0 (unit
148 # test fails when Opus decoder uses fixed-point)
149 # Due to b/16456550, disable the following four test cases:
150 # AudioOutputControllerTest.PlayDivertSwitchDeviceRevertClose
151 # AudioOutputControllerTest.PlaySwitchDeviceClose
152 # AudioStreamHandlerTest.Play
153 # SoundsManagerTest.Play
154 # Disable AudioStreamHandlerTest.ConsecutivePlayRequests (b/16539293)
155 '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',
156 'sync_unit_tests --gtest_filter=-SyncHttpBridgeTest.*',
157 # DoAppendUTF8Invalid fails because of dcheck_always_on flag in Eng builds
158 'url_unittests --gtest_filter=-URLCanonTest.DoAppendUTF8Invalid',
159 ],
160 },
slan5fcffc492015-12-16 05:08:06161 }, { # else desktop or android
wzhong141d6c62015-03-09 23:39:08162 'variables': {
163 'filters': [
wzhong141d6c62015-03-09 23:39:08164 # Disable PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM (not supported)
165 'media_unittests --gtest_filter=-PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM',
166 ],
167 }
168 }],
sanfin09990de2015-11-16 19:08:19169 ['OS=="linux"', {
170 'dependencies': [
171 'cast_crash_unittests',
172 ],
173 }],
gunscha4b98fb2015-01-08 18:52:52174 ['disable_display==0', {
175 'dependencies': [
176 '../gpu/gpu.gyp:gpu_unittests',
177 ],
178 }],
gunsch0bf377642014-11-20 03:44:27179 ['OS!="android"', {
180 'dependencies': [
slanf48fe872015-06-23 19:41:52181 'cast_shell_unittests',
gunsch0bf377642014-11-20 03:44:27182 'cast_shell_browser_test',
gunsch61546362015-03-31 19:26:20183 'media/media.gyp:cast_media_unittests',
gunsch0bf377642014-11-20 03:44:27184 ],
gunsch5fa50f12014-12-09 08:14:11185 'variables': {
186 'filters': [
halliwellbe1e8582015-12-09 19:59:23187 # --enable-local-file-accesses => to load sample media files
188 # --test-launcher-jobs=1 => so internal code can bind to port
189 'cast_shell_browser_test --no-sandbox --enable-local-file-accesses --enable-cma-media-pipeline --ozone-platform=cast --test-launcher-jobs=1',
mbjorge6fc99702016-03-19 00:54:10190 'cast_media_unittests --test-launcher-jobs=1',
gunsch5fa50f12014-12-09 08:14:11191 ],
192 },
slan25bb71f22016-01-06 21:23:55193 'conditions': [
cleichner8de0a332016-02-09 01:26:07194 ['use_alsa==1', {
slan25bb71f22016-01-06 21:23:55195 'dependencies': [
196 'media/media.gyp:alsa_cma_backend_unittests',
197 ],
198 }],
199 ],
gunsch0bf377642014-11-20 03:44:27200 }],
201 ],
202 'includes': ['build/tests/test_list.gypi'],
203 },
gunsch0bf377642014-11-20 03:44:27204 {
205 'target_name': 'cast_metrics_test_support',
206 'type': '<(component)',
207 'dependencies': [
208 'cast_base',
209 ],
210 'sources': [
211 'base/metrics/cast_metrics_test_helper.cc',
212 'base/metrics/cast_metrics_test_helper.h',
213 ],
214 }, # end of target 'cast_metrics_test_support'
215 ], # end of targets
216 'conditions': [
217 ['OS=="android"', {
218 'targets': [
219 {
gunsche4a76972015-07-15 00:39:56220 'target_name': 'cast_base_unittests_apk',
gunsch0bf377642014-11-20 03:44:27221 'type': 'none',
222 'dependencies': [
gunsche4a76972015-07-15 00:39:56223 'cast_base_unittests',
224 ],
225 'variables': {
226 'test_suite_name': 'cast_base_unittests',
227 },
228 'includes': ['../build/apk_test.gypi'],
229 }, # end of target 'cast_base_unittests_apk'
230 {
gunsche4a76972015-07-15 00:39:56231 'target_name': 'cast_android_tests',
232 'type': 'none',
gunsch2b0e12f7e2015-07-15 05:20:37233 'dependencies': ['cast_android_tests_generator'],
234 'conditions': [
yucliu48ba41532015-07-30 21:09:08235 ['chromecast_branding!="public"', {
gunsch2b0e12f7e2015-07-15 05:20:37236 'dependencies': [
237 'internal/chromecast_internal.gyp:cast_android_tests_internal',
238 ],
239 }],
240 ],
241 }, # end of target 'cast_android_tests',
242 {
243 'target_name': 'cast_android_tests_generator',
244 'type': 'none',
gunsche4a76972015-07-15 00:39:56245 'variables': {
246 'filters': [
sanfind3c96512016-03-04 02:39:37247 # ComponentDeathTest is unable to fork processes on Android
248 'cast_base_unittests_apk --gtest_filter=*:-ComponentDeathTest.*',
gunschadc7c9b2015-07-15 22:27:09249 # LayerTreeHost has dozens of separate crashing test cases on Fugu. (b/22512618)
250 'cc_unittests_apk --gtest_filter=*:-LayerTreeHost*',
gunsche4a76972015-07-15 00:39:56251 # The following tests all crash on fugu.
gunsche4a76972015-07-15 00:39:56252 'gfx_unittests_apk --gtest_filter=*:-FontListTest.Fonts_DeriveWithHeightUpperBound',
253 'media_unittests_apk --gtest_filter=*-AudioInputTest.*:AudioAndroidInputTest*',
254 ],
255 },
256 'dependencies': [
257 'cast_base_unittests_apk',
gunsch0bf377642014-11-20 03:44:27258 '../base/base.gyp:base_unittests_apk',
259 '../cc/cc_tests.gyp:cc_unittests_apk',
260 '../ipc/ipc.gyp:ipc_tests_apk',
261 '../media/media.gyp:media_unittests_apk',
toyoshimc64757792015-04-30 14:52:02262 '../media/midi/midi.gyp:midi_unittests_apk',
gunsch0bf377642014-11-20 03:44:27263 '../net/net.gyp:net_unittests_apk',
gunsch0bf377642014-11-20 03:44:27264 '../sql/sql.gyp:sql_unittests_apk',
265 '../sync/sync.gyp:sync_unit_tests_apk',
khushalsagar3a8d0562015-11-23 22:50:36266 '../ui/events/events_unittests.gyp:events_unittests_apk',
gunsch0bf377642014-11-20 03:44:27267 '../ui/gfx/gfx_tests.gyp:gfx_unittests_apk',
268 ],
269 'includes': ['build/tests/test_list.gypi'],
gunsch2b0e12f7e2015-07-15 05:20:37270 }, # end of target 'cast_android_tests_generator'
gunsch0bf377642014-11-20 03:44:27271 {
272 'target_name': 'cast_android_test_lists',
273 'type': 'none',
274 'dependencies': [
275 'cast_android_tests',
276 ],
277 'variables': {
278 'test_generator_py': '<(DEPTH)/chromecast/tools/build/generate_test_lists.py',
279 'test_inputs_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast/tests',
280 },
281 'actions': [
282 {
283 'action_name': 'generate_combined_test_build_list',
284 'message': 'Generating combined test build list',
285 'inputs': ['<(test_generator_py)'],
286 'outputs': ['<(PRODUCT_DIR)/tests/build_test_list_android.txt'],
287 'action': [
288 'python', '<(test_generator_py)',
289 '-t', '<(test_inputs_dir)',
290 '-o', '<@(_outputs)',
291 'pack_build',
292 ],
293 },
gunsche4a76972015-07-15 00:39:56294 {
295 'action_name': 'generate_combined_test_run_list',
296 'message': 'Generating combined test run list',
297 'inputs': ['<(test_generator_py)'],
298 'outputs': ['<(PRODUCT_DIR)/tests/run_test_list.txt'],
299 'action': [
300 'python', '<(test_generator_py)',
301 '-t', '<(test_inputs_dir)',
302 '-o', '<@(_outputs)',
303 'pack_run',
304 ],
305 }
gunsch0bf377642014-11-20 03:44:27306 ],
307 },
308 ], # end of targets
309 }, { # OS!="android"
310 'targets': [
slan87db9d12015-10-05 20:37:38311 # GN target: //chromecast/browser:test_support
gunsch0bf377642014-11-20 03:44:27312 {
313 'target_name': 'cast_shell_test_support',
314 'type': '<(component)',
315 'defines': [
316 'HAS_OUT_OF_PROC_TEST_RUNNER',
317 ],
318 'dependencies': [
319 'cast_shell_core',
carlosk282c4372016-02-02 14:53:49320 '../content/content_shell_and_tests.gyp:content_browser_test_base',
gunsch0bf377642014-11-20 03:44:27321 '../content/content_shell_and_tests.gyp:content_browser_test_support',
rockotc637caf9b2016-02-10 09:57:08322 '../mojo/mojo_public.gyp:mojo_cpp_bindings',
gunsch0bf377642014-11-20 03:44:27323 '../testing/gtest.gyp:gtest',
324 ],
carlosk282c4372016-02-02 14:53:49325 'export_dependent_settings': [
326 '../content/content_shell_and_tests.gyp:content_browser_test_base',
327 ],
gunsch0bf377642014-11-20 03:44:27328 'sources': [
329 'browser/test/chromecast_browser_test.cc',
330 'browser/test/chromecast_browser_test.h',
331 'browser/test/chromecast_browser_test_runner.cc',
332 ],
333 }, # end of target 'cast_shell_test_support'
334 {
335 'target_name': 'cast_shell_browser_test',
336 'type': '<(gtest_target_type)',
337 'dependencies': [
338 'cast_shell_test_support',
halliwell7c3a5f4b2015-11-12 00:19:27339 '../content/content_shell_and_tests.gyp:test_support_content',
340 '../media/media.gyp:media_test_support',
gunsch0bf377642014-11-20 03:44:27341 '../testing/gtest.gyp:gtest',
342 ],
343 'defines': [
344 'HAS_OUT_OF_PROC_TEST_RUNNER',
345 ],
346 'sources': [
347 'browser/test/chromecast_shell_browser_test.cc',
348 ],
halliwell7c3a5f4b2015-11-12 00:19:27349 'conditions': [
350 ['chromecast_branding=="public"', {
351 'dependencies': [
352 # Link default libcast_media_1.0 statically to prevent
353 # linking dynamically against dummy implementation.
354 'media/media.gyp:libcast_media_1.0_default_core',
355 ],
356 }],
357 ],
gunsch0bf377642014-11-20 03:44:27358 },
slan87db9d12015-10-05 20:37:38359 # GN target: //chromecast/app:cast_shell_unittests
slanf48fe872015-06-23 19:41:52360 {
361 'target_name': 'cast_shell_unittests',
362 'type': '<(gtest_target_type)',
363 'dependencies': [
byungchuld95a7a92015-10-08 22:40:39364 'cast_crash_client',
bcf62f62872015-07-29 18:23:52365 'cast_crash_test_support',
slanf48fe872015-06-23 19:41:52366 '../base/base.gyp:run_all_unittests',
367 '../testing/gtest.gyp:gtest',
368 ],
369 'sources': [
370 'app/linux/cast_crash_reporter_client_unittest.cc',
371 ],
372 }, # end of cast_shell_unittests
gunsche4a76972015-07-15 00:39:56373 # Builds all tests and the output lists of build/run targets for those tests.
374 # Note: producing a predetermined list of dependent inputs on which to
375 # regenerate this output is difficult with GYP. This file is not
376 # guaranteed to be regenerated outside of a clean build.
slan87db9d12015-10-05 20:37:38377 # GN target: //chromecast:cast_test_lists
gunsche4a76972015-07-15 00:39:56378 {
379 'target_name': 'cast_test_lists',
380 'type': 'none',
381 'dependencies': [
382 'cast_tests',
383 ],
384 'variables': {
385 'test_generator_py': '<(DEPTH)/chromecast/tools/build/generate_test_lists.py',
386 'test_inputs_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast/tests',
altimin5abfd722015-11-12 18:40:58387 'test_additional_options': '--ozone-platform=headless'
gunsche4a76972015-07-15 00:39:56388 },
389 'actions': [
390 {
391 'action_name': 'generate_combined_test_build_list',
392 'message': 'Generating combined test build list',
393 'inputs': ['<(test_generator_py)'],
394 'outputs': ['<(PRODUCT_DIR)/tests/build_test_list.txt'],
395 'action': [
396 'python', '<(test_generator_py)',
397 '-t', '<(test_inputs_dir)',
398 '-o', '<@(_outputs)',
399 'pack_build',
400 ],
401 },
402 {
403 'action_name': 'generate_combined_test_run_list',
404 'message': 'Generating combined test run list',
405 'inputs': ['<(test_generator_py)'],
406 'outputs': ['<(PRODUCT_DIR)/tests/run_test_list.txt'],
407 'action': [
408 'python', '<(test_generator_py)',
409 '-t', '<(test_inputs_dir)',
410 '-o', '<@(_outputs)',
411 '-a', '<(test_additional_options)',
412 'pack_run',
413 ],
414 }
415 ],
416 },
gunsch0bf377642014-11-20 03:44:27417 ], # end of targets
418 }],
419 ], # end of conditions
420}