blob: 0051bcee95c7637a435506e7ad998801914fb87b [file] [log] [blame]
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +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': [
12 '../build/common.gypi',
13 ],
14 'targets': [
15 {
kjellander@webrtc.org46cec2a2013-06-11 08:29:17 +000016 'target_name': 'channel_transport',
17 'type': 'static_library',
18 'dependencies': [
19 '<(DEPTH)/testing/gtest.gyp:gtest',
20 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
21 ],
22 'sources': [
23 'channel_transport/channel_transport.cc',
24 'channel_transport/include/channel_transport.h',
25 'channel_transport/traffic_control_win.cc',
26 'channel_transport/traffic_control_win.h',
27 'channel_transport/udp_socket_manager_posix.cc',
28 'channel_transport/udp_socket_manager_posix.h',
29 'channel_transport/udp_socket_manager_wrapper.cc',
30 'channel_transport/udp_socket_manager_wrapper.h',
31 'channel_transport/udp_socket_posix.cc',
32 'channel_transport/udp_socket_posix.h',
33 'channel_transport/udp_socket_wrapper.cc',
34 'channel_transport/udp_socket_wrapper.h',
35 'channel_transport/udp_socket2_manager_win.cc',
36 'channel_transport/udp_socket2_manager_win.h',
37 'channel_transport/udp_socket2_win.cc',
38 'channel_transport/udp_socket2_win.h',
39 'channel_transport/udp_transport.h',
40 'channel_transport/udp_transport_impl.cc',
41 'channel_transport/udp_transport_impl.h',
42 ],
43 },
44 {
pbos@webrtc.orgc33d37c2013-12-11 16:26:16 +000045 'target_name': 'frame_generator',
46 'type': 'static_library',
47 'sources': [
48 'frame_generator.cc',
49 'frame_generator.h',
50 ],
51 'dependencies': [
52 '<(webrtc_root)/common_video/common_video.gyp:common_video',
53 ],
54 },
55 {
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000056 'target_name': 'test_support',
57 'type': 'static_library',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000058 'dependencies': [
59 '<(DEPTH)/testing/gtest.gyp:gtest',
60 '<(DEPTH)/testing/gmock.gyp:gmock',
andrew@webrtc.orge41c6b22013-09-05 21:16:29 +000061 '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
andrew@webrtc.org4c27c032013-03-22 17:13:23 +000062 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000063 ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000064 'sources': [
65 'test_suite.cc',
66 'test_suite.h',
henrike@webrtc.orge25e28f2013-07-08 14:55:23 +000067 'testsupport/android/root_path_android.cc',
68 'testsupport/android/root_path_android_chromium.cc',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000069 'testsupport/fileutils.cc',
andrew@webrtc.orgd064f582012-11-20 00:20:20 +000070 'testsupport/fileutils.h',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000071 'testsupport/frame_reader.cc',
andrew@webrtc.orgd064f582012-11-20 00:20:20 +000072 'testsupport/frame_reader.h',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000073 'testsupport/frame_writer.cc',
andrew@webrtc.orgd064f582012-11-20 00:20:20 +000074 'testsupport/frame_writer.h',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000075 'testsupport/gtest_prod_util.h',
phoglund@webrtc.orgb7907412013-01-09 16:53:42 +000076 'testsupport/gtest_disable.h',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000077 'testsupport/mock/mock_frame_reader.h',
78 'testsupport/mock/mock_frame_writer.h',
andrew@webrtc.orgd064f582012-11-20 00:20:20 +000079 'testsupport/packet_reader.cc',
80 'testsupport/packet_reader.h',
81 'testsupport/perf_test.cc',
82 'testsupport/perf_test.h',
andrew@webrtc.org8826e342013-03-25 16:23:37 +000083 'testsupport/trace_to_stderr.cc',
84 'testsupport/trace_to_stderr.h',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000085 ],
henrike@webrtc.orge25e28f2013-07-08 14:55:23 +000086 'conditions': [
87 # TODO(henrike): remove build_with_chromium==1 when the bots are using
88 # Chromium's buildbots.
89 ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', {
90 'dependencies': [
91 '<(DEPTH)/base/base.gyp:base',
92 ],
93 'sources!': [
94 'testsupport/android/root_path_android.cc',
95 ],
henrike@webrtc.orge25e28f2013-07-08 14:55:23 +000096 }, {
97 'sources!': [
98 'testsupport/android/root_path_android_chromium.cc',
99 ],
100 }],
101 ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000102 },
103 {
104 # Depend on this target when you want to have test_support but also the
105 # main method needed for gtest to execute!
106 'target_name': 'test_support_main',
107 'type': 'static_library',
108 'dependencies': [
109 'test_support',
110 ],
111 'sources': [
112 'run_all_unittests.cc',
113 ],
114 },
115 {
116 # Depend on this target when you want to have test_support and a special
117 # main for mac which will run your test on a worker thread and consume
118 # events on the main thread. Useful if you want to access a webcam.
119 # This main will provide all the scaffolding and objective-c black magic
120 # for you. All you need to do is to implement a function in the
121 # run_threaded_main_mac.h file (ImplementThisToRunYourTest).
122 'target_name': 'test_support_main_threaded_mac',
123 'type': 'static_library',
124 'dependencies': [
125 'test_support',
126 ],
127 'sources': [
128 'testsupport/mac/run_threaded_main_mac.h',
129 'testsupport/mac/run_threaded_main_mac.mm',
130 ],
131 },
132 {
133 'target_name': 'test_support_unittests',
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +0000134 'type': '<(gtest_target_type)',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000135 'dependencies': [
kjellander@webrtc.org46cec2a2013-06-11 08:29:17 +0000136 'channel_transport',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000137 'test_support_main',
kjellander@webrtc.org46cec2a2013-06-11 08:29:17 +0000138 '<(DEPTH)/testing/gmock.gyp:gmock',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000139 '<(DEPTH)/testing/gtest.gyp:gtest',
140 ],
141 'sources': [
kjellander@webrtc.org46cec2a2013-06-11 08:29:17 +0000142 'channel_transport/udp_transport_unittest.cc',
143 'channel_transport/udp_socket_manager_unittest.cc',
144 'channel_transport/udp_socket_wrapper_unittest.cc',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000145 'testsupport/unittest_utils.h',
146 'testsupport/fileutils_unittest.cc',
147 'testsupport/frame_reader_unittest.cc',
148 'testsupport/frame_writer_unittest.cc',
149 'testsupport/packet_reader_unittest.cc',
andrew@webrtc.orgd064f582012-11-20 00:20:20 +0000150 'testsupport/perf_test_unittest.cc',
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000151 ],
kjellander@webrtc.org46cec2a2013-06-11 08:29:17 +0000152 # Disable warnings to enable Win64 build, issue 1323.
153 'msvs_disabled_warnings': [
154 4267, # size_t to int truncation.
155 ],
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +0000156 'conditions': [
157 # TODO(henrike): remove build_with_chromium==1 when the bots are
158 # using Chromium's buildbots.
159 ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', {
160 'dependencies': [
161 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
162 ],
163 }],
164 ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000165 },
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000166 ],
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +0000167 'conditions': [
kjellander@webrtc.org8e701082013-10-10 08:48:16 +0000168 ['build_with_chromium==0', {
169 'targets': [
170 {
171 'target_name': 'buildbot_tests_scripts',
172 'type': 'none',
173 'copies': [
174 {
175 'destination': '<(PRODUCT_DIR)',
176 'files': [
177 'buildbot_tests.py',
178 '<(webrtc_root)/tools/e2e_quality/audio/run_audio_test.py',
179 ],
180 },
181 {
182 'destination': '<(PRODUCT_DIR)/perf',
183 'files': [
184 '<(DEPTH)/tools/perf/__init__.py',
185 '<(DEPTH)/tools/perf/perf_utils.py',
186 ],
187 },
188 ],
189 }, # target buildbot_tests_scripts
190 ],
191 }],
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +0000192 # TODO(henrike): remove build_with_chromium==1 when the bots are using
193 # Chromium's buildbots.
194 ['include_tests==1 and build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', {
195 'targets': [
196 {
197 'target_name': 'test_support_unittests_apk_target',
198 'type': 'none',
199 'dependencies': [
200 '<(apk_tests_path):test_support_unittests_apk',
201 ],
202 },
203 ],
204 }],
kjellander@webrtc.org3540c822013-08-22 07:57:00 +0000205 ['test_isolation_mode != "noop"', {
206 'targets': [
207 {
208 'target_name': 'test_support_unittests_run',
209 'type': 'none',
210 'dependencies': [
kjellander@webrtc.org3540c822013-08-22 07:57:00 +0000211 'test_support_unittests',
212 ],
213 'includes': [
kjellander@webrtc.org22a28932013-10-02 19:31:16 +0000214 '../build/isolate.gypi',
kjellander@webrtc.org3540c822013-08-22 07:57:00 +0000215 'test_support_unittests.isolate',
216 ],
217 'sources': [
218 'test_support_unittests.isolate',
219 ],
220 },
221 ],
222 }],
henrike@webrtc.orgacb00f52013-08-02 16:53:47 +0000223 ],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +0000224}