blob: ea831a1471abdbe775d4136be72472b8af3775ff [file] [log] [blame]
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +00001# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9# TODO(andrew): consider moving test_support to src/base/test.
10{
11 'includes': [
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +000012 '../build/common.gypi',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000013 ],
14 'targets': [
15 {
kjellander@webrtc.org6c35e0b2013-06-11 08:29:17 +000016 'target_name': 'channel_transport',
17 'type': 'static_library',
18 'dependencies': [
19 '<(DEPTH)/testing/gtest.gyp:gtest',
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000020 '<(webrtc_root)/common.gyp:webrtc_common',
andresp@webrtc.org86e1e482015-01-14 09:30:52 +000021 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
kjellander@webrtc.org6c35e0b2013-06-11 08:29:17 +000022 ],
23 'sources': [
24 'channel_transport/channel_transport.cc',
25 'channel_transport/include/channel_transport.h',
26 'channel_transport/traffic_control_win.cc',
27 'channel_transport/traffic_control_win.h',
28 'channel_transport/udp_socket_manager_posix.cc',
29 'channel_transport/udp_socket_manager_posix.h',
30 'channel_transport/udp_socket_manager_wrapper.cc',
31 'channel_transport/udp_socket_manager_wrapper.h',
32 'channel_transport/udp_socket_posix.cc',
33 'channel_transport/udp_socket_posix.h',
34 'channel_transport/udp_socket_wrapper.cc',
35 'channel_transport/udp_socket_wrapper.h',
36 'channel_transport/udp_socket2_manager_win.cc',
37 'channel_transport/udp_socket2_manager_win.h',
38 'channel_transport/udp_socket2_win.cc',
39 'channel_transport/udp_socket2_win.h',
40 'channel_transport/udp_transport.h',
41 'channel_transport/udp_transport_impl.cc',
42 'channel_transport/udp_transport_impl.h',
43 ],
44 },
45 {
pbos@webrtc.org724947b2013-12-11 16:26:16 +000046 'target_name': 'frame_generator',
47 'type': 'static_library',
48 'sources': [
49 'frame_generator.cc',
50 'frame_generator.h',
51 ],
52 'dependencies': [
53 '<(webrtc_root)/common_video/common_video.gyp:common_video',
54 ],
55 },
56 {
pbos@webrtc.orgaca58032014-10-27 18:01:03 +000057 'target_name': 'rtp_test_utils',
asapersson@webrtc.org0f2809a2014-02-21 08:14:45 +000058 'type': 'static_library',
59 'sources': [
60 'rtcp_packet_parser.cc',
61 'rtcp_packet_parser.h',
pbos@webrtc.orgaca58032014-10-27 18:01:03 +000062 'rtp_file_reader.cc',
63 'rtp_file_reader.h',
henrik.lundin@webrtc.org83317142014-12-01 11:25:04 +000064 'rtp_file_writer.cc',
65 'rtp_file_writer.h',
asapersson@webrtc.org0f2809a2014-02-21 08:14:45 +000066 ],
67 'dependencies': [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000068 '<(DEPTH)/webrtc/common.gyp:webrtc_common',
asapersson@webrtc.org37c05592015-01-28 13:58:27 +000069 '<(DEPTH)/testing/gtest.gyp:gtest',
asapersson@webrtc.org0f2809a2014-02-21 08:14:45 +000070 '<(webrtc_root)/modules/modules.gyp:rtp_rtcp',
71 ],
72 },
73 {
andresp@webrtc.org60015d22014-05-16 09:39:51 +000074 'target_name': 'field_trial',
75 'type': 'static_library',
76 'sources': [
77 'field_trial.cc',
78 'field_trial.h',
79 ],
80 'dependencies': [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +000081 '<(webrtc_root)/common.gyp:webrtc_common',
andresp@webrtc.org86e1e482015-01-14 09:30:52 +000082 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
andresp@webrtc.org60015d22014-05-16 09:39:51 +000083 ],
84 },
85 {
Åsa Persson352b2d72015-04-15 18:00:40 +020086 'target_name': 'histogram',
87 'type': 'static_library',
88 'sources': [
89 'histogram.cc',
90 'histogram.h',
91 ],
92 'dependencies': [
93 '<(webrtc_root)/common.gyp:webrtc_common',
94 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
95 ],
96 },
97 {
andresp@webrtc.orga36ad692014-05-14 12:24:04 +000098 'target_name': 'test_main',
99 'type': 'static_library',
100 'sources': [
101 'test_main.cc',
102 ],
103 'dependencies': [
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000104 'field_trial',
Åsa Persson352b2d72015-04-15 18:00:40 +0200105 'histogram',
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000106 '<(DEPTH)/testing/gtest.gyp:gtest',
107 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
andresp@webrtc.orga36ad692014-05-14 12:24:04 +0000108 ],
109 },
110 {
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000111 'target_name': 'test_support',
112 'type': 'static_library',
113 'dependencies': [
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +0000114 '<(DEPTH)/testing/gtest.gyp:gtest',
115 '<(DEPTH)/testing/gmock.gyp:gmock',
Henrik Kjellanderf536a502015-04-01 11:45:49 +0200116 '<(webrtc_root)/common.gyp:gtest_prod',
andresp@webrtc.org86e1e482015-01-14 09:30:52 +0000117 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000118 ],
119 'sources': [
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000120 'testsupport/fileutils.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +0000121 'testsupport/fileutils.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +0000122 'testsupport/frame_reader.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +0000123 'testsupport/frame_reader.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +0000124 'testsupport/frame_writer.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +0000125 'testsupport/frame_writer.h',
phoglund@webrtc.orgd0054682013-01-09 16:53:42 +0000126 'testsupport/gtest_disable.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +0000127 'testsupport/mock/mock_frame_reader.h',
128 'testsupport/mock/mock_frame_writer.h',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +0000129 'testsupport/packet_reader.cc',
130 'testsupport/packet_reader.h',
131 'testsupport/perf_test.cc',
132 'testsupport/perf_test.h',
andrew@webrtc.orgb87cc852013-03-25 16:23:37 +0000133 'testsupport/trace_to_stderr.cc',
134 'testsupport/trace_to_stderr.h',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000135 ],
136 },
137 {
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000138 # Depend on this target when you want to have test_support but also the
139 # main method needed for gtest to execute!
140 'target_name': 'test_support_main',
141 'type': 'static_library',
142 'dependencies': [
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000143 'field_trial',
Åsa Persson352b2d72015-04-15 18:00:40 +0200144 'histogram',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000145 'test_support',
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000146 '<(DEPTH)/testing/gmock.gyp:gmock',
147 '<(DEPTH)/testing/gtest.gyp:gtest',
148 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000149 ],
150 'sources': [
151 'run_all_unittests.cc',
andresp@webrtc.org60015d22014-05-16 09:39:51 +0000152 'test_suite.cc',
153 'test_suite.h',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000154 ],
155 },
156 {
phoglund@webrtc.org54e22eb2012-08-08 08:27:46 +0000157 # Depend on this target when you want to have test_support and a special
158 # main for mac which will run your test on a worker thread and consume
159 # events on the main thread. Useful if you want to access a webcam.
160 # This main will provide all the scaffolding and objective-c black magic
161 # for you. All you need to do is to implement a function in the
162 # run_threaded_main_mac.h file (ImplementThisToRunYourTest).
163 'target_name': 'test_support_main_threaded_mac',
164 'type': 'static_library',
165 'dependencies': [
166 'test_support',
167 ],
168 'sources': [
169 'testsupport/mac/run_threaded_main_mac.h',
170 'testsupport/mac/run_threaded_main_mac.mm',
171 ],
172 },
173 {
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000174 'target_name': 'test_support_unittests',
henrike@webrtc.org89c67402013-08-02 16:53:47 +0000175 'type': '<(gtest_target_type)',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000176 'dependencies': [
kjellander@webrtc.org6c35e0b2013-06-11 08:29:17 +0000177 'channel_transport',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000178 'test_support_main',
kjellander@webrtc.org6c35e0b2013-06-11 08:29:17 +0000179 '<(DEPTH)/testing/gmock.gyp:gmock',
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +0000180 '<(DEPTH)/testing/gtest.gyp:gtest',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000181 ],
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000182 'sources': [
kjellander@webrtc.org6c35e0b2013-06-11 08:29:17 +0000183 'channel_transport/udp_transport_unittest.cc',
184 'channel_transport/udp_socket_manager_unittest.cc',
185 'channel_transport/udp_socket_wrapper_unittest.cc',
kjellander@webrtc.org6f729e82014-09-02 15:13:55 +0000186 'testsupport/always_passing_unittest.cc',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +0000187 'testsupport/unittest_utils.h',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000188 'testsupport/fileutils_unittest.cc',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +0000189 'testsupport/frame_reader_unittest.cc',
190 'testsupport/frame_writer_unittest.cc',
191 'testsupport/packet_reader_unittest.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +0000192 'testsupport/perf_test_unittest.cc',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000193 ],
kjellander@webrtc.org6c35e0b2013-06-11 08:29:17 +0000194 # Disable warnings to enable Win64 build, issue 1323.
195 'msvs_disabled_warnings': [
196 4267, # size_t to int truncation.
197 ],
henrike@webrtc.org89c67402013-08-02 16:53:47 +0000198 'conditions': [
kjellander@webrtc.org3bd41562014-09-01 11:06:37 +0000199 ['OS=="android"', {
henrike@webrtc.org89c67402013-08-02 16:53:47 +0000200 'dependencies': [
201 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
202 ],
203 }],
204 ],
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000205 },
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000206 ],
henrike@webrtc.org89c67402013-08-02 16:53:47 +0000207 'conditions': [
kjellander@webrtc.org0372b932014-09-03 14:34:46 +0000208 ['include_tests==1 and OS=="android"', {
henrike@webrtc.org89c67402013-08-02 16:53:47 +0000209 'targets': [
210 {
kjellander@webrtc.org0372b932014-09-03 14:34:46 +0000211 'target_name': 'test_support_unittests_apk_target',
henrike@webrtc.org89c67402013-08-02 16:53:47 +0000212 'type': 'none',
213 'dependencies': [
kjellander@webrtc.org0372b932014-09-03 14:34:46 +0000214 '<(apk_tests_path):test_support_unittests_apk',
henrike@webrtc.org89c67402013-08-02 16:53:47 +0000215 ],
216 },
217 ],
218 }],
kjellander@webrtc.org33654222013-08-22 07:57:00 +0000219 ['test_isolation_mode != "noop"', {
220 'targets': [
221 {
222 'target_name': 'test_support_unittests_run',
223 'type': 'none',
224 'dependencies': [
kjellander@webrtc.org33654222013-08-22 07:57:00 +0000225 'test_support_unittests',
226 ],
227 'includes': [
kjellander@webrtc.org2a973172013-10-02 19:31:16 +0000228 '../build/isolate.gypi',
kjellander@webrtc.org33654222013-08-22 07:57:00 +0000229 ],
230 'sources': [
231 'test_support_unittests.isolate',
232 ],
233 },
234 ],
235 }],
henrike@webrtc.org89c67402013-08-02 16:53:47 +0000236 ],
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000237}