blob: 303c1ef72a820eb81aab5641f5be7bf4047ff945 [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',
kjellander98bba392016-06-01 05:28:54 -070022 '<(webrtc_root)/system_wrappers/system_wrappers.gyp:metrics_default',
Henrik Kjellander15583c12016-02-10 10:53:12 +010023 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +010024 'defines': [
25 # Feature selection.
26 'HAVE_SCTP',
27 ],
28 'sources': [
29 'datachannel_unittest.cc',
Henrik Kjellander15583c12016-02-10 10:53:12 +010030 'dtmfsender_unittest.cc',
31 'fakemetricsobserver.cc',
32 'fakemetricsobserver.h',
33 'jsepsessiondescription_unittest.cc',
34 'localaudiosource_unittest.cc',
perkjf0dcfe22016-03-10 18:32:00 +010035 'mediaconstraintsinterface_unittest.cc',
Henrik Kjellander15583c12016-02-10 10:53:12 +010036 'mediastream_unittest.cc',
37 'peerconnection_unittest.cc',
38 'peerconnectionendtoend_unittest.cc',
39 'peerconnectionfactory_unittest.cc',
40 'peerconnectioninterface_unittest.cc',
kjellandere532aec2016-04-17 20:08:20 -070041 'proxy_unittest.cc',
Henrik Kjellander15583c12016-02-10 10:53:12 +010042 'rtpsenderreceiver_unittest.cc',
43 'statscollector_unittest.cc',
44 'test/fakeaudiocapturemodule.cc',
45 'test/fakeaudiocapturemodule.h',
46 'test/fakeaudiocapturemodule_unittest.cc',
47 'test/fakeconstraints.h',
48 'test/fakedatachannelprovider.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +010049 'test/fakeperiodicvideocapturer.h',
Henrik Boströmd79599d2016-06-01 13:58:50 +020050 'test/fakertccertificategenerator.h',
Henrik Kjellander15583c12016-02-10 10:53:12 +010051 'test/fakevideotrackrenderer.h',
52 'test/mockpeerconnectionobservers.h',
53 'test/peerconnectiontestwrapper.h',
54 'test/peerconnectiontestwrapper.cc',
55 'test/testsdpstrings.h',
perkja3ede6c2016-03-08 01:27:48 +010056 'videocapturertracksource_unittest.cc',
Henrik Kjellander15583c12016-02-10 10:53:12 +010057 'videotrack_unittest.cc',
58 'webrtcsdp_unittest.cc',
59 'webrtcsession_unittest.cc',
60 ],
61 # TODO(kjellander): Make the code compile without disabling these flags.
62 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
63 'cflags': [
64 '-Wno-sign-compare',
65 ],
66 'cflags!': [
67 '-Wextra',
68 ],
69 'cflags_cc!': [
Henrik Kjellander15583c12016-02-10 10:53:12 +010070 '-Woverloaded-virtual',
71 ],
72 'msvs_disabled_warnings': [
73 4245, # conversion from 'int' to 'size_t', signed/unsigned mismatch.
74 4267, # conversion from 'size_t' to 'int', possible loss of data.
75 4389, # signed/unsigned mismatch.
76 ],
77 'conditions': [
78 ['clang==1', {
79 # TODO(kjellander): Make the code compile without disabling these flags.
80 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
81 'cflags!': [
82 '-Wextra',
83 ],
84 'xcode_settings': {
85 'WARNING_CFLAGS!': ['-Wextra'],
86 },
87 }],
88 ['OS=="android"', {
89 'sources': [
90 'test/androidtestinitializer.cc',
91 'test/androidtestinitializer.h',
92 ],
93 'dependencies': [
94 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
95 '<(webrtc_root)/api/api.gyp:libjingle_peerconnection_jni',
96 ],
97 }],
98 ['OS=="win" and clang==1', {
99 'msvs_settings': {
100 'VCCLCompilerTool': {
101 'AdditionalOptions': [
102 # Disable warnings failing when compiling with Clang on Windows.
103 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
104 '-Wno-sign-compare',
105 '-Wno-unused-function',
106 ],
107 },
108 },
109 }],
mikescarlett9bc517f2016-04-29 18:30:55 -0700110 ['use_quic==1', {
111 'dependencies': [
112 '<(DEPTH)/third_party/libquic/libquic.gyp:libquic',
113 ],
114 'sources': [
115 'quicdatachannel_unittest.cc',
116 'quicdatatransport_unittest.cc',
117 ],
118 'export_dependent_settings': [
119 '<(DEPTH)/third_party/libquic/libquic.gyp:libquic',
120 ],
121 }],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100122 ], # conditions
123 }, # target peerconnection_unittests
124 ], # targets
hjonaa32c3e2015-12-13 19:58:11 -0800125 'conditions': [
Henrik Kjellander15583c12016-02-10 10:53:12 +0100126 ['OS=="android"', {
127 'targets': [
128 {
129 'target_name': 'libjingle_peerconnection_android_unittest',
130 'type': 'none',
131 'dependencies': [
132 '<(webrtc_root)/api/api.gyp:libjingle_peerconnection_java',
133 ],
134 'variables': {
135 'apk_name': 'libjingle_peerconnection_android_unittest',
136 'java_in_dir': 'androidtests',
137 'resource_dir': 'androidtests/res',
138 'native_lib_target': 'libjingle_peerconnection_so',
139 'is_test_apk': 1,
agrievebabf8ee2016-04-08 06:54:23 -0700140 'test_type': 'instrumentation',
141 'tested_apk_path': '',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100142 'never_lint': 1,
143 },
agrievebabf8ee2016-04-08 06:54:23 -0700144 'includes': [
145 '../../build/java_apk.gypi',
146 '../../build/android/test_runner.gypi',
147 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100148 },
149 ], # targets
150 }], # OS=="android"
Henrik Kjellander15583c12016-02-10 10:53:12 +0100151 ['OS=="android"', {
152 'targets': [
153 {
154 'target_name': 'peerconnection_unittests_apk_target',
155 'type': 'none',
156 'dependencies': [
kjellander208d1982016-05-31 04:01:38 -0700157 '<(android_tests_path):peerconnection_unittests_apk',
Henrik Kjellander15583c12016-02-10 10:53:12 +0100158 ],
159 },
160 ],
kjellandere532aec2016-04-17 20:08:20 -0700161 'conditions': [
162 ['test_isolation_mode != "noop"',
163 {
164 'targets': [
165 {
166 'target_name': 'peerconnection_unittests_apk_run',
167 'type': 'none',
168 'dependencies': [
kjellander208d1982016-05-31 04:01:38 -0700169 '<(android_tests_path):peerconnection_unittests_apk',
kjellandere532aec2016-04-17 20:08:20 -0700170 ],
171 'includes': [
172 '../build/isolate.gypi',
173 ],
174 'sources': [
175 'peerconnection_unittests_apk.isolate',
176 ],
177 },
178 ]
179 }
180 ],
181 ],
Henrik Kjellander15583c12016-02-10 10:53:12 +0100182 }], # OS=="android"
183 ['test_isolation_mode != "noop"', {
184 'targets': [
185 {
186 'target_name': 'peerconnection_unittests_run',
187 'type': 'none',
188 'dependencies': [
189 'peerconnection_unittests',
190 ],
191 'includes': [
192 '../build/isolate.gypi',
193 ],
194 'sources': [
195 'peerconnection_unittests.isolate',
196 ],
197 },
198 ], # targets
199 }], # test_isolation_mode != "noop"
200 ], # conditions
hjonaa32c3e2015-12-13 19:58:11 -0800201}