blob: e58fdbcb28a8b93cc28296d14738ef38056f42b6 [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!': [
Henrik Kjellander15583c12016-02-10 10:53:12 +010075 '-Woverloaded-virtual',
76 ],
77 'msvs_disabled_warnings': [
78 4245, # conversion from 'int' to 'size_t', signed/unsigned mismatch.
79 4267, # conversion from 'size_t' to 'int', possible loss of data.
80 4389, # signed/unsigned mismatch.
81 ],
82 'conditions': [
83 ['clang==1', {
84 # TODO(kjellander): Make the code compile without disabling these flags.
85 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
86 'cflags!': [
87 '-Wextra',
88 ],
89 'xcode_settings': {
90 'WARNING_CFLAGS!': ['-Wextra'],
91 },
92 }],
93 ['OS=="android"', {
94 'sources': [
95 'test/androidtestinitializer.cc',
96 'test/androidtestinitializer.h',
97 ],
98 'dependencies': [
99 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
100 '<(webrtc_root)/api/api.gyp:libjingle_peerconnection_jni',
101 ],
102 }],
103 ['OS=="win" and clang==1', {
104 'msvs_settings': {
105 'VCCLCompilerTool': {
106 'AdditionalOptions': [
107 # Disable warnings failing when compiling with Clang on Windows.
108 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
109 '-Wno-sign-compare',
110 '-Wno-unused-function',
111 ],
112 },
113 },
114 }],
mikescarlett9bc517f2016-04-29 18:30:55 -0700115 ['use_quic==1', {
116 'dependencies': [
117 '<(DEPTH)/third_party/libquic/libquic.gyp:libquic',
118 ],
119 'sources': [
120 'quicdatachannel_unittest.cc',
121 'quicdatatransport_unittest.cc',
122 ],
123 'export_dependent_settings': [
124 '<(DEPTH)/third_party/libquic/libquic.gyp:libquic',
125 ],
126 }],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100127 ], # conditions
128 }, # target peerconnection_unittests
129 ], # targets
hjonaa32c3e2015-12-13 19:58:11 -0800130 'conditions': [
Henrik Kjellander15583c12016-02-10 10:53:12 +0100131 ['OS=="android"', {
132 'targets': [
133 {
134 'target_name': 'libjingle_peerconnection_android_unittest',
135 'type': 'none',
136 'dependencies': [
137 '<(webrtc_root)/api/api.gyp:libjingle_peerconnection_java',
138 ],
139 'variables': {
140 'apk_name': 'libjingle_peerconnection_android_unittest',
141 'java_in_dir': 'androidtests',
142 'resource_dir': 'androidtests/res',
143 'native_lib_target': 'libjingle_peerconnection_so',
144 'is_test_apk': 1,
agrievebabf8ee2016-04-08 06:54:23 -0700145 'test_type': 'instrumentation',
146 'tested_apk_path': '',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100147 'never_lint': 1,
148 },
agrievebabf8ee2016-04-08 06:54:23 -0700149 'includes': [
150 '../../build/java_apk.gypi',
151 '../../build/android/test_runner.gypi',
152 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100153 },
154 ], # targets
155 }], # OS=="android"
Henrik Kjellander15583c12016-02-10 10:53:12 +0100156 ['OS=="android"', {
157 'targets': [
158 {
159 'target_name': 'peerconnection_unittests_apk_target',
160 'type': 'none',
161 'dependencies': [
kjellander208d1982016-05-31 04:01:38 -0700162 '<(android_tests_path):peerconnection_unittests_apk',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100163 ],
164 },
165 ],
kjellandere532aec2016-04-17 20:08:20 -0700166 'conditions': [
167 ['test_isolation_mode != "noop"',
168 {
169 'targets': [
170 {
171 'target_name': 'peerconnection_unittests_apk_run',
172 'type': 'none',
173 'dependencies': [
kjellander208d1982016-05-31 04:01:38 -0700174 '<(android_tests_path):peerconnection_unittests_apk',
kjellandere532aec2016-04-17 20:08:20 -0700175 ],
176 'includes': [
177 '../build/isolate.gypi',
178 ],
179 'sources': [
180 'peerconnection_unittests_apk.isolate',
181 ],
182 },
183 ]
184 }
185 ],
186 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100187 }], # OS=="android"
188 ['test_isolation_mode != "noop"', {
189 'targets': [
190 {
191 'target_name': 'peerconnection_unittests_run',
192 'type': 'none',
193 'dependencies': [
194 'peerconnection_unittests',
195 ],
196 'includes': [
197 '../build/isolate.gypi',
198 ],
199 'sources': [
200 'peerconnection_unittests.isolate',
201 ],
202 },
203 ], # targets
204 }], # test_isolation_mode != "noop"
205 ], # conditions
hjonaa32c3e2015-12-13 19:58:11 -0800206}