summaryrefslogtreecommitdiffstats
path: root/media/cast/cast_testing_tools.gypi
diff options
context:
space:
mode:
authormiu <miu@chromium.org>2015-11-25 17:23:29 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-26 01:24:17 +0000
commit45b848fe18655d1836d08b5f024899cdaa0b33db (patch)
tree7f89f03b8b8c7745136aa221e094fe8a9a7ccc02 /media/cast/cast_testing_tools.gypi
parent51d2f0c733b47605d75cfe5b4e94832f9a5dcd85 (diff)
downloadchromium_src-45b848fe18655d1836d08b5f024899cdaa0b33db.zip
chromium_src-45b848fe18655d1836d08b5f024899cdaa0b33db.tar.gz
chromium_src-45b848fe18655d1836d08b5f024899cdaa0b33db.tar.bz2
media/cast: Get cast_unittests building on Android
1. Re-sync'ed GYP and GN build files, consolidating duplicated items to appear once in common targets. Aside from aesthetics, this resolved some link issues for Android. 2. Factored the cast testing tools into a separate GYPI to make it clear they were being built for the desktop platforms only, and to make things more manageable for the future. 3. Tweaks to enable generation of cast_unittests_apk and its successful run on Android. Testing notes: Generated build files using both GYP and GN, built and ran cast_unittests on Linux, and built and ran cast_unittests_apk on Android x86. Also, trybot runs in one patch set have sanity-checked the same on other platforms/architectures. BUG=558714 Review URL: https://codereview.chromium.org/1473143002 Cr-Commit-Position: refs/heads/master@{#361783}
Diffstat (limited to 'media/cast/cast_testing_tools.gypi')
-rw-r--r--media/cast/cast_testing_tools.gypi211
1 files changed, 211 insertions, 0 deletions
diff --git a/media/cast/cast_testing_tools.gypi b/media/cast/cast_testing_tools.gypi
new file mode 100644
index 0000000..0532b9d
--- /dev/null
+++ b/media/cast/cast_testing_tools.gypi
@@ -0,0 +1,211 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'conditions': [
+ ['OS=="win" or OS=="mac" or OS=="linux"', {
+ 'targets': [
+ {
+ # This is a target for the collection of cast development tools. They
+ # are not built/linked into the Chromium browser.
+ 'target_name': 'cast_testing_tools',
+ 'type': 'none',
+ 'dependencies': [
+ 'cast_receiver_app',
+ 'cast_sender_app',
+ 'cast_simulator',
+ 'udp_proxy',
+ ],
+ },
+ {
+ # GN version: //media/cast:cast_benchmarks
+ 'target_name': 'cast_benchmarks',
+ 'type': '<(gtest_target_type)',
+ 'include_dirs': [
+ '<(DEPTH)/',
+ ],
+ 'dependencies': [
+ 'cast_common',
+ 'cast_net',
+ 'cast_receiver',
+ 'cast_sender',
+ 'cast_test_utility',
+ '<(DEPTH)/net/net.gyp:net',
+ '<(DEPTH)/testing/gtest.gyp:gtest',
+ ],
+ 'sources': [
+ 'test/cast_benchmarks.cc',
+ ], # source
+ 'conditions': [
+ ['os_posix==1 and OS!="mac" and OS!="ios" and use_allocator!="none"',
+ {
+ 'dependencies': [
+ '<(DEPTH)/base/allocator/allocator.gyp:allocator',
+ ],
+ }
+ ],
+ ],
+ },
+ {
+ # GN version: //media/cast:cast_receiver_app
+ 'target_name': 'cast_receiver_app',
+ 'type': 'executable',
+ 'include_dirs': [
+ '<(DEPTH)/',
+ ],
+ 'dependencies': [
+ 'cast_common',
+ 'cast_net',
+ 'cast_receiver',
+ 'cast_test_utility',
+ '<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',
+ ],
+ 'sources': [
+ '<(DEPTH)/media/cast/test/receiver.cc',
+ ],
+ 'conditions': [
+ ['OS == "linux" and use_x11==1', {
+ 'dependencies': [
+ '<(DEPTH)/build/linux/system.gyp:x11',
+ '<(DEPTH)/build/linux/system.gyp:xext',
+ ],
+ 'sources': [
+ '<(DEPTH)/media/cast/test/linux_output_window.cc',
+ '<(DEPTH)/media/cast/test/linux_output_window.h',
+ ],
+ }],
+ ],
+ },
+ {
+ # GN version: //media/cast:cast_sender_app
+ 'target_name': 'cast_sender_app',
+ 'type': 'executable',
+ 'include_dirs': [
+ '<(DEPTH)/',
+ ],
+ 'dependencies': [
+ 'cast_common',
+ 'cast_net',
+ 'cast_sender',
+ 'cast_test_utility',
+ ],
+ 'sources': [
+ '<(DEPTH)/media/cast/test/sender.cc',
+ ],
+ },
+ {
+ # GN version: //media/cast:cast_simulator
+ 'target_name': 'cast_simulator',
+ 'type': 'executable',
+ 'include_dirs': [
+ '<(DEPTH)/',
+ ],
+ 'dependencies': [
+ 'cast_common',
+ 'cast_net',
+ 'cast_network_model_proto',
+ 'cast_sender',
+ 'cast_test_utility',
+ ],
+ 'sources': [
+ '<(DEPTH)/media/cast/test/simulator.cc',
+ ],
+ },
+ {
+ # GN version: //media/cast:network_model_proto
+ 'target_name': 'cast_network_model_proto',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '<(DEPTH)/',
+ ],
+ 'sources': [
+ 'test/proto/network_simulation_model.proto',
+ ],
+ 'variables': {
+ 'proto_in_dir': 'test/proto',
+ 'proto_out_dir': 'media/cast/test/proto',
+ },
+ 'includes': ['../../build/protoc.gypi'],
+ },
+ {
+ # GN version: //media/cast:generate_barcode_video
+ 'target_name': 'generate_barcode_video',
+ 'type': 'executable',
+ 'include_dirs': [
+ '<(DEPTH)/',
+ ],
+ 'dependencies': [
+ 'cast_test_utility',
+ '<(DEPTH)/base/base.gyp:base',
+ '<(DEPTH)/media/media.gyp:media',
+ ],
+ 'sources': [
+ 'test/utility/generate_barcode_video.cc',
+ ],
+ },
+ {
+ # GN version: //media/cast:generate_timecode_audio
+ 'target_name': 'generate_timecode_audio',
+ 'type': 'executable',
+ 'include_dirs': [
+ '<(DEPTH)/',
+ ],
+ 'dependencies': [
+ 'cast_common',
+ 'cast_net',
+ 'cast_test_utility',
+ '<(DEPTH)/base/base.gyp:base',
+ '<(DEPTH)/media/media.gyp:media',
+ ],
+ 'sources': [
+ 'test/utility/generate_timecode_audio.cc',
+ ],
+ },
+ {
+ # GN version: //media/cast:udp_proxy
+ 'target_name': 'udp_proxy',
+ 'type': 'executable',
+ 'include_dirs': [
+ '<(DEPTH)/',
+ ],
+ 'dependencies': [
+ 'cast_test_utility',
+ '<(DEPTH)/base/base.gyp:base',
+ ],
+ 'sources': [
+ 'test/utility/udp_proxy_main.cc',
+ ],
+ },
+ ],
+ }, { # not (OS=="win" or OS=="mac" or OS=="linux")
+ 'targets': [
+ {
+ # The testing tools are only built for the desktop platforms.
+ 'target_name': 'cast_testing_tools',
+ 'type': 'none',
+ },
+ ],
+ }],
+ ['OS=="linux"', {
+ 'targets': [
+ {
+ # GN version: //media/cast:tap_proxy
+ 'target_name': 'tap_proxy',
+ 'type': 'executable',
+ 'include_dirs': [
+ '<(DEPTH)/',
+ ],
+ 'dependencies': [
+ 'cast_test_utility',
+ '<(DEPTH)/base/base.gyp:base',
+ '<(DEPTH)/media/media.gyp:media',
+ ],
+ 'sources': [
+ 'test/utility/tap_proxy.cc',
+ ],
+ }
+ ]
+ }],
+ ], # conditions
+}