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', |
kjellander | 98bba39 | 2016-06-01 05:28:54 -0700 | [diff] [blame] | 22 | '<(webrtc_root)/system_wrappers/system_wrappers.gyp:metrics_default', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 23 | ], |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 24 | 'defines': [ |
| 25 | # Feature selection. |
| 26 | 'HAVE_SCTP', |
| 27 | ], |
| 28 | 'sources': [ |
| 29 | 'datachannel_unittest.cc', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 30 | 'dtmfsender_unittest.cc', |
| 31 | 'fakemetricsobserver.cc', |
| 32 | 'fakemetricsobserver.h', |
| 33 | 'jsepsessiondescription_unittest.cc', |
| 34 | 'localaudiosource_unittest.cc', |
perkj | f0dcfe2 | 2016-03-10 18:32:00 +0100 | [diff] [blame] | 35 | 'mediaconstraintsinterface_unittest.cc', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 36 | 'mediastream_unittest.cc', |
| 37 | 'peerconnection_unittest.cc', |
| 38 | 'peerconnectionendtoend_unittest.cc', |
| 39 | 'peerconnectionfactory_unittest.cc', |
| 40 | 'peerconnectioninterface_unittest.cc', |
kjellander | e532aec | 2016-04-17 20:08:20 -0700 | [diff] [blame] | 41 | 'proxy_unittest.cc', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 42 | '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 Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 49 | 'test/fakeperiodicvideocapturer.h', |
Henrik Boström | d79599d | 2016-06-01 13:58:50 +0200 | [diff] [blame] | 50 | 'test/fakertccertificategenerator.h', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 51 | 'test/fakevideotrackrenderer.h', |
| 52 | 'test/mockpeerconnectionobservers.h', |
| 53 | 'test/peerconnectiontestwrapper.h', |
| 54 | 'test/peerconnectiontestwrapper.cc', |
| 55 | 'test/testsdpstrings.h', |
perkj | a3ede6c | 2016-03-08 01:27:48 +0100 | [diff] [blame] | 56 | 'videocapturertracksource_unittest.cc', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 57 | '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 Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 70 | '-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 | }], |
mikescarlett | 9bc517f | 2016-04-29 18:30:55 -0700 | [diff] [blame] | 110 | ['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 Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 122 | ], # conditions |
| 123 | }, # target peerconnection_unittests |
| 124 | ], # targets |
hjon | aa32c3e | 2015-12-13 19:58:11 -0800 | [diff] [blame] | 125 | 'conditions': [ |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 126 | ['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, |
agrieve | babf8ee | 2016-04-08 06:54:23 -0700 | [diff] [blame] | 140 | 'test_type': 'instrumentation', |
| 141 | 'tested_apk_path': '', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 142 | 'never_lint': 1, |
| 143 | }, |
agrieve | babf8ee | 2016-04-08 06:54:23 -0700 | [diff] [blame] | 144 | 'includes': [ |
| 145 | '../../build/java_apk.gypi', |
| 146 | '../../build/android/test_runner.gypi', |
| 147 | ], |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 148 | }, |
| 149 | ], # targets |
| 150 | }], # OS=="android" |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 151 | ['OS=="android"', { |
| 152 | 'targets': [ |
| 153 | { |
| 154 | 'target_name': 'peerconnection_unittests_apk_target', |
| 155 | 'type': 'none', |
| 156 | 'dependencies': [ |
kjellander | 208d198 | 2016-05-31 04:01:38 -0700 | [diff] [blame] | 157 | '<(android_tests_path):peerconnection_unittests_apk', |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 158 | ], |
| 159 | }, |
| 160 | ], |
kjellander | e532aec | 2016-04-17 20:08:20 -0700 | [diff] [blame] | 161 | 'conditions': [ |
| 162 | ['test_isolation_mode != "noop"', |
| 163 | { |
| 164 | 'targets': [ |
| 165 | { |
| 166 | 'target_name': 'peerconnection_unittests_apk_run', |
| 167 | 'type': 'none', |
| 168 | 'dependencies': [ |
kjellander | 208d198 | 2016-05-31 04:01:38 -0700 | [diff] [blame] | 169 | '<(android_tests_path):peerconnection_unittests_apk', |
kjellander | e532aec | 2016-04-17 20:08:20 -0700 | [diff] [blame] | 170 | ], |
| 171 | 'includes': [ |
| 172 | '../build/isolate.gypi', |
| 173 | ], |
| 174 | 'sources': [ |
| 175 | 'peerconnection_unittests_apk.isolate', |
| 176 | ], |
| 177 | }, |
| 178 | ] |
| 179 | } |
| 180 | ], |
| 181 | ], |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 182 | }], # 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 |
hjon | aa32c3e | 2015-12-13 19:58:11 -0800 | [diff] [blame] | 201 | } |