blob: 53285f90dff728dab540033a06f4c00ee13d8009 [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',
20 '<(webrtc_root)/webrtc.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',
htaa2a49d92016-03-04 02:51:39 -080040 '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',
46 # 'peerconnectionproxy_unittest.cc',
47 'remotevideocapturer_unittest.cc',
48 'rtpsenderreceiver_unittest.cc',
49 'statscollector_unittest.cc',
50 'test/fakeaudiocapturemodule.cc',
51 'test/fakeaudiocapturemodule.h',
52 'test/fakeaudiocapturemodule_unittest.cc',
53 'test/fakeconstraints.h',
54 'test/fakedatachannelprovider.h',
55 'test/fakedtlsidentitystore.h',
56 'test/fakeperiodicvideocapturer.h',
57 'test/fakevideotrackrenderer.h',
58 'test/mockpeerconnectionobservers.h',
59 'test/peerconnectiontestwrapper.h',
60 'test/peerconnectiontestwrapper.cc',
61 'test/testsdpstrings.h',
perkja3ede6c2016-03-08 01:27:48 +010062 'videocapturertracksource_unittest.cc',
Henrik Kjellander15583c12016-02-10 10:53:12 +010063 'videotrack_unittest.cc',
64 'webrtcsdp_unittest.cc',
65 'webrtcsession_unittest.cc',
66 ],
67 # TODO(kjellander): Make the code compile without disabling these flags.
68 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
69 'cflags': [
70 '-Wno-sign-compare',
71 ],
72 'cflags!': [
73 '-Wextra',
74 ],
75 'cflags_cc!': [
76 '-Wnon-virtual-dtor',
77 '-Woverloaded-virtual',
78 ],
79 'msvs_disabled_warnings': [
80 4245, # conversion from 'int' to 'size_t', signed/unsigned mismatch.
81 4267, # conversion from 'size_t' to 'int', possible loss of data.
82 4389, # signed/unsigned mismatch.
83 ],
84 'conditions': [
85 ['clang==1', {
86 # TODO(kjellander): Make the code compile without disabling these flags.
87 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
88 'cflags!': [
89 '-Wextra',
90 ],
91 'xcode_settings': {
92 'WARNING_CFLAGS!': ['-Wextra'],
93 },
94 }],
95 ['OS=="android"', {
96 'sources': [
97 'test/androidtestinitializer.cc',
98 'test/androidtestinitializer.h',
99 ],
100 'dependencies': [
101 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
102 '<(webrtc_root)/api/api.gyp:libjingle_peerconnection_jni',
103 ],
104 }],
105 ['OS=="win" and clang==1', {
106 'msvs_settings': {
107 'VCCLCompilerTool': {
108 'AdditionalOptions': [
109 # Disable warnings failing when compiling with Clang on Windows.
110 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
111 '-Wno-sign-compare',
112 '-Wno-unused-function',
113 ],
114 },
115 },
116 }],
117 ], # conditions
118 }, # target peerconnection_unittests
119 ], # targets
hjonaa32c3e2015-12-13 19:58:11 -0800120 'conditions': [
Henrik Kjellander15583c12016-02-10 10:53:12 +0100121 ['OS=="android"', {
122 'targets': [
123 {
124 'target_name': 'libjingle_peerconnection_android_unittest',
125 'type': 'none',
126 'dependencies': [
127 '<(webrtc_root)/api/api.gyp:libjingle_peerconnection_java',
128 ],
129 'variables': {
130 'apk_name': 'libjingle_peerconnection_android_unittest',
131 'java_in_dir': 'androidtests',
132 'resource_dir': 'androidtests/res',
133 'native_lib_target': 'libjingle_peerconnection_so',
134 'is_test_apk': 1,
135 'never_lint': 1,
136 },
137 'includes': [ '../../build/java_apk.gypi' ],
138 },
139 ], # targets
140 }], # OS=="android"
hjon6b039952016-02-25 12:32:58 -0800141 ['OS=="ios" or (OS=="mac" and mac_deployment_target=="10.7")', {
hjonaa32c3e2015-12-13 19:58:11 -0800142 'targets': [
143 {
tkchinab8f82f2016-01-27 17:50:11 -0800144 'target_name': 'rtc_api_objc_tests',
hjonaa32c3e2015-12-13 19:58:11 -0800145 'type': 'executable',
hjon6b039952016-02-25 12:32:58 -0800146 'includes': [
147 '../build/objc_common.gypi',
148 ],
hjonaa32c3e2015-12-13 19:58:11 -0800149 'dependencies': [
150 '<(webrtc_root)/api/api.gyp:rtc_api_objc',
151 '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils',
152 ],
153 'sources': [
hjon6d49a8e2016-01-26 13:06:42 -0800154 'objctests/RTCConfigurationTest.mm',
hjonda2183c2016-01-27 13:42:28 -0800155 'objctests/RTCDataChannelConfigurationTest.mm',
Jon Hjelle29d5e572016-01-06 11:49:11 -0800156 'objctests/RTCIceCandidateTest.mm',
157 'objctests/RTCIceServerTest.mm',
hjon6f5ca082016-01-07 09:29:29 -0800158 'objctests/RTCMediaConstraintsTest.mm',
Jon Hjelle67e83d62016-01-06 12:05:22 -0800159 'objctests/RTCSessionDescriptionTest.mm',
hjonaa32c3e2015-12-13 19:58:11 -0800160 ],
161 'xcode_settings': {
hjonaa32c3e2015-12-13 19:58:11 -0800162 # |-ObjC| flag needed to make sure category method implementations
163 # are included:
164 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
165 'OTHER_LDFLAGS': ['-ObjC'],
166 },
Henrik Kjellander15583c12016-02-10 10:53:12 +0100167 },
hjonaa32c3e2015-12-13 19:58:11 -0800168 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100169 }], # OS=="ios"
170 ['OS=="android"', {
171 'targets': [
172 {
173 'target_name': 'peerconnection_unittests_apk_target',
174 'type': 'none',
175 'dependencies': [
176 '<(apk_tests_path):peerconnection_unittests_apk',
177 ],
178 },
179 ],
180 }], # OS=="android"
181 ['test_isolation_mode != "noop"', {
182 'targets': [
183 {
184 'target_name': 'peerconnection_unittests_run',
185 'type': 'none',
186 'dependencies': [
187 'peerconnection_unittests',
188 ],
189 'includes': [
190 '../build/isolate.gypi',
191 ],
192 'sources': [
193 'peerconnection_unittests.isolate',
194 ],
195 },
196 ], # targets
197 }], # test_isolation_mode != "noop"
198 ], # conditions
hjonaa32c3e2015-12-13 19:58:11 -0800199}