webrtc_m130/webrtc/api/api_tests.gyp

199 lines
6.7 KiB
Plaintext
Raw Normal View History

# Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
{
'includes': [ '../build/common.gypi', ],
'targets': [
{
'target_name': 'peerconnection_unittests',
'type': '<(gtest_target_type)',
'dependencies': [
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(webrtc_root)/api/api.gyp:libjingle_peerconnection',
'<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils',
'<(webrtc_root)/common.gyp:webrtc_common',
Reland of move {media,p2p,pc,xmllite,xmpp}_tests.gypi files. (patchset #1 id:1 of https://codereview.webrtc.org/1846693002/ ) The re-land moves the isolate build targets for media.gyp and pc.gyp into the include_tests==1 condition. This has been tested in a Chromium checkout and no longer causes the error that was seen after landing https://codereview.webrtc.org/1839763004/ Original issue's description: > Revert of Remove {media,p2p,pc,xmllite,xmpp}_tests.gypi files. (patchset #1 id:1 of https://codereview.webrtc.org/1839763004/ ) > > Reason for revert: > Breaks Chromium: https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/11313/steps/gclient%20runhooks/logs/stdio: > > Updating projects from gyp files... > Using overrides found in /Users/chrome-bot/.gyp/include.gypi > Traceback (most recent call last): > File "src/build/gyp_chromium", line 12, in <module> > execfile(__file__ + '.py') > File "src/build/gyp_chromium.py", line 341, in <module> > sys.exit(main()) > File "src/build/gyp_chromium.py", line 328, in main > gyp_rc = gyp.main(args) > File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/__init__.py", line 538, in main > return gyp_main(args) > File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/__init__.py", line 514, in gyp_main > options.duplicate_basename_check) > File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/__init__.py", line 130, in Load > params['parallel'], params['root_targets']) > File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/input.py", line 2800, in Load > RemoveLinkDependenciesFromNoneTargets(targets) > File "/b/build/slave/Mac_Builder/build/src/tools/gyp/pylib/gyp/input.py", line 1510, in RemoveLinkDependenciesFromNoneTargets > if targets[t].get('variables', {}).get('link_dependency', 0): > KeyError: '/b/build/slave/Mac_Builder/build/src/third_party/webrtc/media/media.gyp:rtc_media_unittests#target' > Error: Command '/usr/bin/python src/build/gyp_chromium' returned non-zero exit status 1 in /b/build/slave/Mac_Builder/build > Hook '/usr/bin/python src/build/gyp_chromium' took 20.29 secs > > Original issue's description: > > Remove {media,p2p,pc,xmllite,xmpp}_tests.gypi files. > > > > These contributes to circular dependency problems in WebRTC > > since one have to depend on webrtc.gyp in order to depend on > > a target in them. > > > > This reduces the number of cyclic dependencies in WebRTC from 21 > > to 16. > > > > BUG=webrtc:4243 > > NOTRY=True > > NOPRESUBMIT=True > > > > Committed: https://crrev.com/231b69f28dd22f4e2d98e5048f8eaae7b20915e6 > > Cr-Commit-Position: refs/heads/master@{#12166} > > TBR=pthatcher@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:4243 > > Committed: https://crrev.com/72644d2cf6b14bbc4a107f79158eaa225f3196b5 > Cr-Commit-Position: refs/heads/master@{#12167} TBR=pthatcher@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:4243 Review URL: https://codereview.webrtc.org/1843193002 Cr-Commit-Position: refs/heads/master@{#12180}
2016-03-31 07:23:49 -07:00
'<(webrtc_root)/media/media.gyp:rtc_unittest_main',
'<(webrtc_root)/pc/pc.gyp:rtc_pc',
],
'direct_dependent_settings': {
'include_dirs': [
'<(DEPTH)/testing/gmock/include',
],
},
'defines': [
# Feature selection.
'HAVE_SCTP',
],
'sources': [
'datachannel_unittest.cc',
'dtlsidentitystore_unittest.cc',
'dtmfsender_unittest.cc',
'fakemetricsobserver.cc',
'fakemetricsobserver.h',
'jsepsessiondescription_unittest.cc',
'localaudiosource_unittest.cc',
'mediaconstraintsinterface_unittest.cc',
'mediastream_unittest.cc',
'peerconnection_unittest.cc',
'peerconnectionendtoend_unittest.cc',
'peerconnectionfactory_unittest.cc',
'peerconnectioninterface_unittest.cc',
# 'peerconnectionproxy_unittest.cc',
'rtpsenderreceiver_unittest.cc',
'statscollector_unittest.cc',
'test/fakeaudiocapturemodule.cc',
'test/fakeaudiocapturemodule.h',
'test/fakeaudiocapturemodule_unittest.cc',
'test/fakeconstraints.h',
'test/fakedatachannelprovider.h',
'test/fakedtlsidentitystore.h',
'test/fakeperiodicvideocapturer.h',
'test/fakevideotrackrenderer.h',
'test/mockpeerconnectionobservers.h',
'test/peerconnectiontestwrapper.h',
'test/peerconnectiontestwrapper.cc',
'test/testsdpstrings.h',
'videocapturertracksource_unittest.cc',
'videotrack_unittest.cc',
'webrtcsdp_unittest.cc',
'webrtcsession_unittest.cc',
],
# TODO(kjellander): Make the code compile without disabling these flags.
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
'cflags': [
'-Wno-sign-compare',
],
'cflags!': [
'-Wextra',
],
'cflags_cc!': [
'-Wnon-virtual-dtor',
'-Woverloaded-virtual',
],
'msvs_disabled_warnings': [
4245, # conversion from 'int' to 'size_t', signed/unsigned mismatch.
4267, # conversion from 'size_t' to 'int', possible loss of data.
4389, # signed/unsigned mismatch.
],
'conditions': [
['clang==1', {
# TODO(kjellander): Make the code compile without disabling these flags.
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
'cflags!': [
'-Wextra',
],
'xcode_settings': {
'WARNING_CFLAGS!': ['-Wextra'],
},
}],
['OS=="android"', {
'sources': [
'test/androidtestinitializer.cc',
'test/androidtestinitializer.h',
],
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
'<(webrtc_root)/api/api.gyp:libjingle_peerconnection_jni',
],
}],
['OS=="win" and clang==1', {
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
# Disable warnings failing when compiling with Clang on Windows.
# https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
'-Wno-sign-compare',
'-Wno-unused-function',
],
},
},
}],
], # conditions
}, # target peerconnection_unittests
], # targets
'conditions': [
['OS=="android"', {
'targets': [
{
'target_name': 'libjingle_peerconnection_android_unittest',
'type': 'none',
'dependencies': [
'<(webrtc_root)/api/api.gyp:libjingle_peerconnection_java',
],
'variables': {
'apk_name': 'libjingle_peerconnection_android_unittest',
'java_in_dir': 'androidtests',
'resource_dir': 'androidtests/res',
'native_lib_target': 'libjingle_peerconnection_so',
'is_test_apk': 1,
'never_lint': 1,
},
'includes': [ '../../build/java_apk.gypi' ],
},
], # targets
}], # OS=="android"
['OS=="ios" or (OS=="mac" and mac_deployment_target=="10.7")', {
'targets': [
{
'target_name': 'rtc_api_objc_tests',
'type': 'executable',
'includes': [
'../build/objc_common.gypi',
],
'dependencies': [
'<(webrtc_root)/api/api.gyp:rtc_api_objc',
'<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils',
],
'sources': [
'objctests/RTCConfigurationTest.mm',
'objctests/RTCDataChannelConfigurationTest.mm',
'objctests/RTCIceCandidateTest.mm',
'objctests/RTCIceServerTest.mm',
'objctests/RTCMediaConstraintsTest.mm',
'objctests/RTCSessionDescriptionTest.mm',
],
'xcode_settings': {
# |-ObjC| flag needed to make sure category method implementations
# are included:
# https://developer.apple.com/library/mac/qa/qa1490/_index.html
'OTHER_LDFLAGS': ['-ObjC'],
},
},
],
}], # OS=="ios"
['OS=="android"', {
'targets': [
{
'target_name': 'peerconnection_unittests_apk_target',
'type': 'none',
'dependencies': [
'<(apk_tests_path):peerconnection_unittests_apk',
],
},
],
}], # OS=="android"
['test_isolation_mode != "noop"', {
'targets': [
{
'target_name': 'peerconnection_unittests_run',
'type': 'none',
'dependencies': [
'peerconnection_unittests',
],
'includes': [
'../build/isolate.gypi',
],
'sources': [
'peerconnection_unittests.isolate',
],
},
], # targets
}], # test_isolation_mode != "noop"
], # conditions
}