blob: 0d08e7ff6ec16bd4fef29ffcdea6391d3d5c1a9d [file] [log] [blame]
hjonaa32c3e2015-12-13 19:58:11 -08001# Copyright (c) 2015 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{
10 'includes': [ '../build/common.gypi', ],
Henrik Kjellander15583c12016-02-10 10:53:12 +010011 'targets': [
12 {
13 'target_name': 'peerconnection_unittests',
14 'type': '<(gtest_target_type)',
15 'dependencies': [
16 '<(DEPTH)/testing/gmock.gyp:gmock',
17 '<(webrtc_root)/api/api.gyp:libjingle_peerconnection',
18 '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils',
19 '<(webrtc_root)/common.gyp:webrtc_common',
kjellander00984ff2016-03-31 07:23:49 -070020 '<(webrtc_root)/media/media.gyp:rtc_unittest_main',
kjellander@webrtc.org9b8df252016-02-12 06:47:59 +010021 '<(webrtc_root)/pc/pc.gyp:rtc_pc',
Henrik Kjellander15583c12016-02-10 10:53:12 +010022 ],
23 'direct_dependent_settings': {
24 'include_dirs': [
25 '<(DEPTH)/testing/gmock/include',
26 ],
27 },
28 'defines': [
29 # Feature selection.
30 'HAVE_SCTP',
31 ],
32 'sources': [
33 'datachannel_unittest.cc',
34 'dtlsidentitystore_unittest.cc',
35 'dtmfsender_unittest.cc',
36 'fakemetricsobserver.cc',
37 'fakemetricsobserver.h',
38 'jsepsessiondescription_unittest.cc',
39 'localaudiosource_unittest.cc',
perkjf0dcfe22016-03-10 18:32:00 +010040 'mediaconstraintsinterface_unittest.cc',
Henrik Kjellander15583c12016-02-10 10:53:12 +010041 'mediastream_unittest.cc',
42 'peerconnection_unittest.cc',
43 'peerconnectionendtoend_unittest.cc',
44 'peerconnectionfactory_unittest.cc',
45 'peerconnectioninterface_unittest.cc',
kjellandere532aec2016-04-17 20:08:20 -070046 'proxy_unittest.cc',
Henrik Kjellander15583c12016-02-10 10:53:12 +010047 'rtpsenderreceiver_unittest.cc',
48 'statscollector_unittest.cc',
49 'test/fakeaudiocapturemodule.cc',
50 'test/fakeaudiocapturemodule.h',
51 'test/fakeaudiocapturemodule_unittest.cc',
52 'test/fakeconstraints.h',
53 'test/fakedatachannelprovider.h',
54 'test/fakedtlsidentitystore.h',
55 'test/fakeperiodicvideocapturer.h',
56 'test/fakevideotrackrenderer.h',
57 'test/mockpeerconnectionobservers.h',
58 'test/peerconnectiontestwrapper.h',
59 'test/peerconnectiontestwrapper.cc',
60 'test/testsdpstrings.h',
perkja3ede6c2016-03-08 01:27:48 +010061 'videocapturertracksource_unittest.cc',
Henrik Kjellander15583c12016-02-10 10:53:12 +010062 'videotrack_unittest.cc',
63 'webrtcsdp_unittest.cc',
64 'webrtcsession_unittest.cc',
65 ],
66 # TODO(kjellander): Make the code compile without disabling these flags.
67 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
68 'cflags': [
69 '-Wno-sign-compare',
70 ],
71 'cflags!': [
72 '-Wextra',
73 ],
74 'cflags_cc!': [
75 '-Wnon-virtual-dtor',
76 '-Woverloaded-virtual',
77 ],
78 'msvs_disabled_warnings': [
79 4245, # conversion from 'int' to 'size_t', signed/unsigned mismatch.
80 4267, # conversion from 'size_t' to 'int', possible loss of data.
81 4389, # signed/unsigned mismatch.
82 ],
83 'conditions': [
84 ['clang==1', {
85 # TODO(kjellander): Make the code compile without disabling these flags.
86 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
87 'cflags!': [
88 '-Wextra',
89 ],
90 'xcode_settings': {
91 'WARNING_CFLAGS!': ['-Wextra'],
92 },
93 }],
94 ['OS=="android"', {
95 'sources': [
96 'test/androidtestinitializer.cc',
97 'test/androidtestinitializer.h',
98 ],
99 'dependencies': [
100 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
101 '<(webrtc_root)/api/api.gyp:libjingle_peerconnection_jni',
102 ],
103 }],
104 ['OS=="win" and clang==1', {
105 'msvs_settings': {
106 'VCCLCompilerTool': {
107 'AdditionalOptions': [
108 # Disable warnings failing when compiling with Clang on Windows.
109 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
110 '-Wno-sign-compare',
111 '-Wno-unused-function',
112 ],
113 },
114 },
115 }],
116 ], # conditions
117 }, # target peerconnection_unittests
118 ], # targets
hjonaa32c3e2015-12-13 19:58:11 -0800119 'conditions': [
Henrik Kjellander15583c12016-02-10 10:53:12 +0100120 ['OS=="android"', {
121 'targets': [
122 {
123 'target_name': 'libjingle_peerconnection_android_unittest',
124 'type': 'none',
125 'dependencies': [
126 '<(webrtc_root)/api/api.gyp:libjingle_peerconnection_java',
127 ],
128 'variables': {
129 'apk_name': 'libjingle_peerconnection_android_unittest',
130 'java_in_dir': 'androidtests',
131 'resource_dir': 'androidtests/res',
132 'native_lib_target': 'libjingle_peerconnection_so',
133 'is_test_apk': 1,
agrievebabf8ee2016-04-08 06:54:23 -0700134 'test_type': 'instrumentation',
135 'tested_apk_path': '',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100136 'never_lint': 1,
137 },
agrievebabf8ee2016-04-08 06:54:23 -0700138 'includes': [
139 '../../build/java_apk.gypi',
140 '../../build/android/test_runner.gypi',
141 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100142 },
143 ], # targets
144 }], # OS=="android"
hjon6b039952016-02-25 12:32:58 -0800145 ['OS=="ios" or (OS=="mac" and mac_deployment_target=="10.7")', {
hjonaa32c3e2015-12-13 19:58:11 -0800146 'targets': [
147 {
tkchinab8f82f2016-01-27 17:50:11 -0800148 'target_name': 'rtc_api_objc_tests',
hjonaa32c3e2015-12-13 19:58:11 -0800149 'type': 'executable',
hjon6b039952016-02-25 12:32:58 -0800150 'includes': [
151 '../build/objc_common.gypi',
152 ],
hjonaa32c3e2015-12-13 19:58:11 -0800153 'dependencies': [
154 '<(webrtc_root)/api/api.gyp:rtc_api_objc',
155 '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils',
156 ],
157 'sources': [
hjon6d49a8e2016-01-26 13:06:42 -0800158 'objctests/RTCConfigurationTest.mm',
hjonda2183c2016-01-27 13:42:28 -0800159 'objctests/RTCDataChannelConfigurationTest.mm',
Jon Hjelle29d5e572016-01-06 11:49:11 -0800160 'objctests/RTCIceCandidateTest.mm',
161 'objctests/RTCIceServerTest.mm',
hjon6f5ca082016-01-07 09:29:29 -0800162 'objctests/RTCMediaConstraintsTest.mm',
Jon Hjelle67e83d62016-01-06 12:05:22 -0800163 'objctests/RTCSessionDescriptionTest.mm',
hjonaa32c3e2015-12-13 19:58:11 -0800164 ],
165 'xcode_settings': {
hjonaa32c3e2015-12-13 19:58:11 -0800166 # |-ObjC| flag needed to make sure category method implementations
167 # are included:
168 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
169 'OTHER_LDFLAGS': ['-ObjC'],
170 },
Henrik Kjellander15583c12016-02-10 10:53:12 +0100171 },
hjonaa32c3e2015-12-13 19:58:11 -0800172 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100173 }], # OS=="ios"
174 ['OS=="android"', {
175 'targets': [
176 {
177 'target_name': 'peerconnection_unittests_apk_target',
178 'type': 'none',
179 'dependencies': [
180 '<(apk_tests_path):peerconnection_unittests_apk',
181 ],
182 },
183 ],
kjellandere532aec2016-04-17 20:08:20 -0700184 'conditions': [
185 ['test_isolation_mode != "noop"',
186 {
187 'targets': [
188 {
189 'target_name': 'peerconnection_unittests_apk_run',
190 'type': 'none',
191 'dependencies': [
192 '<(apk_tests_path):peerconnection_unittests_apk',
193 ],
194 'includes': [
195 '../build/isolate.gypi',
196 ],
197 'sources': [
198 'peerconnection_unittests_apk.isolate',
199 ],
200 },
201 ]
202 }
203 ],
204 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100205 }], # OS=="android"
206 ['test_isolation_mode != "noop"', {
207 'targets': [
208 {
209 'target_name': 'peerconnection_unittests_run',
210 'type': 'none',
211 'dependencies': [
212 'peerconnection_unittests',
213 ],
214 'includes': [
215 '../build/isolate.gypi',
216 ],
217 'sources': [
218 'peerconnection_unittests.isolate',
219 ],
220 },
221 ], # targets
222 }], # test_isolation_mode != "noop"
223 ], # conditions
hjonaa32c3e2015-12-13 19:58:11 -0800224}