hjon | aa32c3e | 2015-12-13 19:58:11 -0800 | [diff] [blame] | 1 | # 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 Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 11 | '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', |
kjellander | 00984ff | 2016-03-31 07:23:49 -0700 | [diff] [blame] | 20 | '<(webrtc_root)/media/media.gyp:rtc_unittest_main', |
kjellander@webrtc.org | 9b8df25 | 2016-02-12 06:47:59 +0100 | [diff] [blame] | 21 | '<(webrtc_root)/pc/pc.gyp:rtc_pc', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 22 | ], |
| 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', |
perkj | f0dcfe2 | 2016-03-10 18:32:00 +0100 | [diff] [blame] | 40 | 'mediaconstraintsinterface_unittest.cc', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 41 | 'mediastream_unittest.cc', |
| 42 | 'peerconnection_unittest.cc', |
| 43 | 'peerconnectionendtoend_unittest.cc', |
| 44 | 'peerconnectionfactory_unittest.cc', |
| 45 | 'peerconnectioninterface_unittest.cc', |
kjellander | e532aec | 2016-04-17 20:08:20 -0700 | [diff] [blame] | 46 | 'proxy_unittest.cc', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 47 | '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', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 54 | 'test/fakeperiodicvideocapturer.h', |
Henrik Boström | d79599d | 2016-06-01 13:58:50 +0200 | [diff] [blame^] | 55 | 'test/fakertccertificategenerator.h', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 56 | 'test/fakevideotrackrenderer.h', |
| 57 | 'test/mockpeerconnectionobservers.h', |
| 58 | 'test/peerconnectiontestwrapper.h', |
| 59 | 'test/peerconnectiontestwrapper.cc', |
| 60 | 'test/testsdpstrings.h', |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame] | 61 | 'videocapturertracksource_unittest.cc', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 62 | '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 Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 75 | '-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 | }], |
mikescarlett | 9bc517f | 2016-04-29 18:30:55 -0700 | [diff] [blame] | 115 | ['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 Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 127 | ], # conditions |
| 128 | }, # target peerconnection_unittests |
| 129 | ], # targets |
hjon | aa32c3e | 2015-12-13 19:58:11 -0800 | [diff] [blame] | 130 | 'conditions': [ |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 131 | ['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, |
agrieve | babf8ee | 2016-04-08 06:54:23 -0700 | [diff] [blame] | 145 | 'test_type': 'instrumentation', |
| 146 | 'tested_apk_path': '', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 147 | 'never_lint': 1, |
| 148 | }, |
agrieve | babf8ee | 2016-04-08 06:54:23 -0700 | [diff] [blame] | 149 | 'includes': [ |
| 150 | '../../build/java_apk.gypi', |
| 151 | '../../build/android/test_runner.gypi', |
| 152 | ], |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 153 | }, |
| 154 | ], # targets |
| 155 | }], # OS=="android" |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 156 | ['OS=="android"', { |
| 157 | 'targets': [ |
| 158 | { |
| 159 | 'target_name': 'peerconnection_unittests_apk_target', |
| 160 | 'type': 'none', |
| 161 | 'dependencies': [ |
kjellander | 208d198 | 2016-05-31 04:01:38 -0700 | [diff] [blame] | 162 | '<(android_tests_path):peerconnection_unittests_apk', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 163 | ], |
| 164 | }, |
| 165 | ], |
kjellander | e532aec | 2016-04-17 20:08:20 -0700 | [diff] [blame] | 166 | 'conditions': [ |
| 167 | ['test_isolation_mode != "noop"', |
| 168 | { |
| 169 | 'targets': [ |
| 170 | { |
| 171 | 'target_name': 'peerconnection_unittests_apk_run', |
| 172 | 'type': 'none', |
| 173 | 'dependencies': [ |
kjellander | 208d198 | 2016-05-31 04:01:38 -0700 | [diff] [blame] | 174 | '<(android_tests_path):peerconnection_unittests_apk', |
kjellander | e532aec | 2016-04-17 20:08:20 -0700 | [diff] [blame] | 175 | ], |
| 176 | 'includes': [ |
| 177 | '../build/isolate.gypi', |
| 178 | ], |
| 179 | 'sources': [ |
| 180 | 'peerconnection_unittests_apk.isolate', |
| 181 | ], |
| 182 | }, |
| 183 | ] |
| 184 | } |
| 185 | ], |
| 186 | ], |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 187 | }], # 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 |
hjon | aa32c3e | 2015-12-13 19:58:11 -0800 | [diff] [blame] | 206 | } |