From 231b69f28dd22f4e2d98e5048f8eaae7b20915e6 Mon Sep 17 00:00:00 2001 From: kjellander Date: Wed, 30 Mar 2016 11:40:33 -0700 Subject: [PATCH] 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 Review URL: https://codereview.webrtc.org/1839763004 Cr-Commit-Position: refs/heads/master@{#12166} --- webrtc/api/api_tests.gyp | 2 +- webrtc/libjingle/xmllite/xmllite.gyp | 22 ++- webrtc/libjingle/xmllite/xmllite_tests.gypi | 28 --- webrtc/libjingle/xmpp/xmpp.gyp | 32 ++- webrtc/libjingle/xmpp/xmpp_tests.gypi | 37 ---- webrtc/media/media.gyp | 184 ++++++++++++++++++ webrtc/media/media_tests.gypi | 174 ----------------- .../{ => media}/rtc_media_unittests.isolate | 0 webrtc/p2p/p2p.gyp | 48 ++++- webrtc/p2p/p2p_tests.gypi | 53 ----- webrtc/pc/pc.gyp | 73 ++++++- webrtc/pc/pc_tests.gypi | 61 ------ webrtc/{ => pc}/rtc_pc_unittests.isolate | 0 webrtc/webrtc.gyp | 5 - webrtc/webrtc_tests.gypi | 32 +-- 15 files changed, 359 insertions(+), 392 deletions(-) delete mode 100644 webrtc/libjingle/xmllite/xmllite_tests.gypi delete mode 100644 webrtc/libjingle/xmpp/xmpp_tests.gypi delete mode 100644 webrtc/media/media_tests.gypi rename webrtc/{ => media}/rtc_media_unittests.isolate (100%) delete mode 100644 webrtc/p2p/p2p_tests.gypi delete mode 100755 webrtc/pc/pc_tests.gypi rename webrtc/{ => pc}/rtc_pc_unittests.isolate (100%) diff --git a/webrtc/api/api_tests.gyp b/webrtc/api/api_tests.gyp index bb706dcf0f..b7cbd687ad 100644 --- a/webrtc/api/api_tests.gyp +++ b/webrtc/api/api_tests.gyp @@ -17,7 +17,7 @@ '<(webrtc_root)/api/api.gyp:libjingle_peerconnection', '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils', '<(webrtc_root)/common.gyp:webrtc_common', - '<(webrtc_root)/webrtc.gyp:rtc_unittest_main', + '<(webrtc_root)/media/media.gyp:rtc_unittest_main', '<(webrtc_root)/pc/pc.gyp:rtc_pc', ], 'direct_dependent_settings': { diff --git a/webrtc/libjingle/xmllite/xmllite.gyp b/webrtc/libjingle/xmllite/xmllite.gyp index c297b42b5c..1d76de673c 100644 --- a/webrtc/libjingle/xmllite/xmllite.gyp +++ b/webrtc/libjingle/xmllite/xmllite.gyp @@ -42,5 +42,25 @@ 'xmlprinter.h', ], }, - ], + ], # targets + 'conditions': [ + ['include_tests==1', { + 'targets' : [ + { + 'target_name': 'rtc_xmllite_unittest', + 'type': 'none', + 'direct_dependent_settings': { + 'sources': [ + 'qname_unittest.cc', + 'xmlbuilder_unittest.cc', + 'xmlelement_unittest.cc', + 'xmlnsstack_unittest.cc', + 'xmlparser_unittest.cc', + 'xmlprinter_unittest.cc', + ], + }, + }, # target rtc_xmllite_unittest + ], # targets + }], # include_tests==1 + ], # conditions } diff --git a/webrtc/libjingle/xmllite/xmllite_tests.gypi b/webrtc/libjingle/xmllite/xmllite_tests.gypi deleted file mode 100644 index 600a0f55a7..0000000000 --- a/webrtc/libjingle/xmllite/xmllite_tests.gypi +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2014 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': 'rtc_xmllite_unittest', - 'type': 'none', - 'direct_dependent_settings': { - 'sources': [ - 'qname_unittest.cc', - 'xmlbuilder_unittest.cc', - 'xmlelement_unittest.cc', - 'xmlnsstack_unittest.cc', - 'xmlparser_unittest.cc', - 'xmlprinter_unittest.cc', - ], - }, - }, - ], -} - diff --git a/webrtc/libjingle/xmpp/xmpp.gyp b/webrtc/libjingle/xmpp/xmpp.gyp index 6b738e7f3c..4dc75f7b52 100644 --- a/webrtc/libjingle/xmpp/xmpp.gyp +++ b/webrtc/libjingle/xmpp/xmpp.gyp @@ -140,6 +140,36 @@ ], }], ], - }], + }, + ], # targets + 'conditions': [ + ['include_tests==1', { + 'targets' : [ + { + 'target_name': 'rtc_xmpp_unittest', + 'type': 'none', + 'direct_dependent_settings': { + 'sources': [ + 'fakexmppclient.h', + 'hangoutpubsubclient_unittest.cc', + 'jid_unittest.cc', + 'mucroomconfigtask_unittest.cc', + 'mucroomdiscoverytask_unittest.cc', + 'mucroomlookuptask_unittest.cc', + 'mucroomuniquehangoutidtask_unittest.cc', + 'pingtask_unittest.cc', + 'pubsubclient_unittest.cc', + 'pubsubtasks_unittest.cc', + 'util_unittest.cc', + 'util_unittest.h', + 'xmppengine_unittest.cc', + 'xmpplogintask_unittest.cc', + 'xmppstanzaparser_unittest.cc', + ], + }, + }, # target rtc_xmpp_unittest + ], # targets + }], # include_tests==1 + ], # conditions } diff --git a/webrtc/libjingle/xmpp/xmpp_tests.gypi b/webrtc/libjingle/xmpp/xmpp_tests.gypi deleted file mode 100644 index f1dec1cd1c..0000000000 --- a/webrtc/libjingle/xmpp/xmpp_tests.gypi +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2014 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': 'rtc_xmpp_unittest', - 'type': 'none', - 'direct_dependent_settings': { - 'sources': [ - 'fakexmppclient.h', - 'hangoutpubsubclient_unittest.cc', - 'jid_unittest.cc', - 'mucroomconfigtask_unittest.cc', - 'mucroomdiscoverytask_unittest.cc', - 'mucroomlookuptask_unittest.cc', - 'mucroomuniquehangoutidtask_unittest.cc', - 'pingtask_unittest.cc', - 'pubsubclient_unittest.cc', - 'pubsubtasks_unittest.cc', - 'util_unittest.cc', - 'util_unittest.h', - 'xmppengine_unittest.cc', - 'xmpplogintask_unittest.cc', - 'xmppstanzaparser_unittest.cc', - ], - }, - }, - ], -} - diff --git a/webrtc/media/media.gyp b/webrtc/media/media.gyp index f9cff465b9..94aa649523 100644 --- a/webrtc/media/media.gyp +++ b/webrtc/media/media.gyp @@ -197,4 +197,188 @@ ], }, # target rtc_media ], # targets. + 'conditions': [ + ['include_tests==1', { + 'targets' : [ + { + 'target_name': 'rtc_unittest_main', + 'type': 'static_library', + 'dependencies': [ + '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '<(libyuv_dir)/include', + '<(DEPTH)/testing/gtest/include', + '<(DEPTH)/testing/gtest', + ], + }, + 'conditions': [ + ['build_libyuv==1', { + 'dependencies': ['<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',], + }], + ['OS=="ios"', { + # TODO(kjellander): Make the code compile without disabling these. + # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307 + 'cflags': [ + '-Wno-unused-variable', + ], + 'xcode_settings': { + 'WARNING_CFLAGS': [ + '-Wno-unused-variable', + ], + }, + }], + ], + 'include_dirs': [ + '<(DEPTH)/testing/gtest/include', + '<(DEPTH)/testing/gtest', + ], + 'sources': [ + 'base/fakemediaengine.h', + 'base/fakenetworkinterface.h', + 'base/fakertp.h', + 'base/fakevideocapturer.h', + 'base/fakevideorenderer.h', + 'base/testutils.cc', + 'base/testutils.h', + 'engine/fakewebrtccall.cc', + 'engine/fakewebrtccall.h', + 'engine/fakewebrtccommon.h', + 'engine/fakewebrtcdeviceinfo.h', + 'engine/fakewebrtcvcmfactory.h', + 'engine/fakewebrtcvideocapturemodule.h', + 'engine/fakewebrtcvideoengine.h', + 'engine/fakewebrtcvoiceengine.h', + ], + # TODO(kjellander): Make the code compile without disabling these flags. + # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307 + 'cflags_cc!': [ + '-Wnon-virtual-dtor', + ], + }, # target rtc_unittest_main + { + 'target_name': 'rtc_media_unittests', + 'type': 'executable', + 'dependencies': [ + '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils', + '<(webrtc_root)/media/media.gyp:rtc_media', + 'rtc_unittest_main', + ], + 'sources': [ + 'base/codec_unittest.cc', + 'base/rtpdataengine_unittest.cc', + 'base/rtpdump_unittest.cc', + 'base/rtputils_unittest.cc', + 'base/streamparams_unittest.cc', + 'base/turnutils_unittest.cc', + 'base/videoadapter_unittest.cc', + 'base/videobroadcaster_unittest.cc', + 'base/videocapturer_unittest.cc', + 'base/videocommon_unittest.cc', + 'base/videoengine_unittest.h', + 'base/videoframe_unittest.h', + 'engine/nullwebrtcvideoengine_unittest.cc', + 'engine/simulcast_unittest.cc', + 'engine/webrtcmediaengine_unittest.cc', + 'engine/webrtcvideocapturer_unittest.cc', + 'engine/webrtcvideoframe_unittest.cc', + 'engine/webrtcvideoframefactory_unittest.cc', + 'engine/webrtcvideoengine2_unittest.cc', + 'engine/webrtcvoiceengine_unittest.cc', + 'sctp/sctpdataengine_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_cc!': [ + '-Wnon-virtual-dtor', + '-Woverloaded-virtual', + ], + 'msvs_disabled_warnings': [ + 4245, # conversion from 'int' to 'uint32_t', signed/unsigned mismatch. + 4389, # signed/unsigned mismatch. + ], + 'conditions': [ + ['OS=="win"', { + 'conditions': [ + ['use_openssl==0', { + 'dependencies': [ + '<(DEPTH)/net/third_party/nss/ssl.gyp:libssl', + '<(DEPTH)/third_party/nss/nss.gyp:nspr', + '<(DEPTH)/third_party/nss/nss.gyp:nss', + ], + }], + ], + 'msvs_settings': { + 'VCLinkerTool': { + 'AdditionalDependencies': [ + # TODO(ronghuawu): Since we've included strmiids in + # libjingle_media target, we shouldn't need this here. + # Find out why it doesn't work without this. + 'strmiids.lib', + ], + }, + }, + }], + ['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', + ], + }, + }, + },], + ['clang==1', { + # TODO(kjellander): Make the code compile without disabling these. + # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307 + 'cflags!': [ + '-Wextra', + ], + 'xcode_settings': { + 'WARNING_CFLAGS!': ['-Wextra'], + }, + }], + ['OS=="ios"', { + 'sources!': [ + 'sctp/sctpdataengine_unittest.cc', + ], + 'mac_bundle_resources': [ + '<(DEPTH)/resources/media/captured-320x240-2s-48.frames', + '<(DEPTH)/resources/media/faces.1280x720_P420.yuv', + '<(DEPTH)/resources/media/faces_I420.jpg', + '<(DEPTH)/resources/media/faces_I422.jpg', + '<(DEPTH)/resources/media/faces_I444.jpg', + '<(DEPTH)/resources/media/faces_I411.jpg', + '<(DEPTH)/resources/media/faces_I400.jpg', + ], + }], + ], + }, # target rtc_media_unittests + ], + }], + ['test_isolation_mode != "noop"', { + 'targets': [ + { + 'target_name': 'rtc_media_unittests_run', + 'type': 'none', + 'dependencies': [ + 'rtc_media_unittests', + ], + 'includes': [ + '../build/isolate.gypi', + ], + 'sources': [ + 'rtc_media_unittests.isolate', + ], + }, + ], + }], + ], # conditions } diff --git a/webrtc/media/media_tests.gypi b/webrtc/media/media_tests.gypi deleted file mode 100644 index f850490d9d..0000000000 --- a/webrtc/media/media_tests.gypi +++ /dev/null @@ -1,174 +0,0 @@ -# Copyright (c) 2014 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': 'rtc_unittest_main', - 'type': 'static_library', - 'dependencies': [ - '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '<(libyuv_dir)/include', - '<(DEPTH)/testing/gtest/include', - '<(DEPTH)/testing/gtest', - ], - }, - 'conditions': [ - ['build_libyuv==1', { - 'dependencies': ['<(DEPTH)/third_party/libyuv/libyuv.gyp:libyuv',], - }], - ['OS=="ios"', { - # TODO(kjellander): Make the code compile without disabling these. - # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307 - 'cflags': [ - '-Wno-unused-variable', - ], - 'xcode_settings': { - 'WARNING_CFLAGS': [ - '-Wno-unused-variable', - ], - }, - }], - ], - 'include_dirs': [ - '<(DEPTH)/testing/gtest/include', - '<(DEPTH)/testing/gtest', - ], - 'sources': [ - 'base/fakemediaengine.h', - 'base/fakenetworkinterface.h', - 'base/fakertp.h', - 'base/fakevideocapturer.h', - 'base/fakevideorenderer.h', - 'base/testutils.cc', - 'base/testutils.h', - 'engine/fakewebrtccall.cc', - 'engine/fakewebrtccall.h', - 'engine/fakewebrtccommon.h', - 'engine/fakewebrtcdeviceinfo.h', - 'engine/fakewebrtcvcmfactory.h', - 'engine/fakewebrtcvideocapturemodule.h', - 'engine/fakewebrtcvideoengine.h', - 'engine/fakewebrtcvoiceengine.h', - ], - # TODO(kjellander): Make the code compile without disabling these flags. - # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307 - 'cflags_cc!': [ - '-Wnon-virtual-dtor', - ], - }, # target rtc_unittest_main - { - 'target_name': 'rtc_media_unittests', - 'type': 'executable', - 'dependencies': [ - '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils', - '<(webrtc_root)/media/media.gyp:rtc_media', - 'rtc_unittest_main', - ], - 'sources': [ - 'base/codec_unittest.cc', - 'base/rtpdataengine_unittest.cc', - 'base/rtpdump_unittest.cc', - 'base/rtputils_unittest.cc', - 'base/streamparams_unittest.cc', - 'base/turnutils_unittest.cc', - 'base/videoadapter_unittest.cc', - 'base/videobroadcaster_unittest.cc', - 'base/videocapturer_unittest.cc', - 'base/videocommon_unittest.cc', - 'base/videoengine_unittest.h', - 'base/videoframe_unittest.h', - 'engine/nullwebrtcvideoengine_unittest.cc', - 'engine/simulcast_unittest.cc', - 'engine/webrtcmediaengine_unittest.cc', - 'engine/webrtcvideocapturer_unittest.cc', - 'engine/webrtcvideoframe_unittest.cc', - 'engine/webrtcvideoframefactory_unittest.cc', - 'engine/webrtcvideoengine2_unittest.cc', - 'engine/webrtcvoiceengine_unittest.cc', - 'sctp/sctpdataengine_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_cc!': [ - '-Wnon-virtual-dtor', - '-Woverloaded-virtual', - ], - 'msvs_disabled_warnings': [ - 4245, # conversion from 'int' to 'uint32_t', signed/unsigned mismatch. - 4389, # signed/unsigned mismatch. - ], - 'conditions': [ - ['OS=="win"', { - 'conditions': [ - ['use_openssl==0', { - 'dependencies': [ - '<(DEPTH)/net/third_party/nss/ssl.gyp:libssl', - '<(DEPTH)/third_party/nss/nss.gyp:nspr', - '<(DEPTH)/third_party/nss/nss.gyp:nss', - ], - }], - ], - 'msvs_settings': { - 'VCLinkerTool': { - 'AdditionalDependencies': [ - # TODO(ronghuawu): Since we've included strmiids in - # libjingle_media target, we shouldn't need this here. - # Find out why it doesn't work without this. - 'strmiids.lib', - ], - }, - }, - }], - ['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', - ], - }, - }, - },], - ['clang==1', { - # TODO(kjellander): Make the code compile without disabling these. - # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307 - 'cflags!': [ - '-Wextra', - ], - 'xcode_settings': { - 'WARNING_CFLAGS!': ['-Wextra'], - }, - }], - ['OS=="ios"', { - 'sources!': [ - 'sctp/sctpdataengine_unittest.cc', - ], - 'mac_bundle_resources': [ - '<(DEPTH)/resources/media/captured-320x240-2s-48.frames', - '<(DEPTH)/resources/media/faces.1280x720_P420.yuv', - '<(DEPTH)/resources/media/faces_I420.jpg', - '<(DEPTH)/resources/media/faces_I422.jpg', - '<(DEPTH)/resources/media/faces_I444.jpg', - '<(DEPTH)/resources/media/faces_I411.jpg', - '<(DEPTH)/resources/media/faces_I400.jpg', - ], - }], - ], - }, # target rtc_media_unittests - ], -} diff --git a/webrtc/rtc_media_unittests.isolate b/webrtc/media/rtc_media_unittests.isolate similarity index 100% rename from webrtc/rtc_media_unittests.isolate rename to webrtc/media/rtc_media_unittests.isolate diff --git a/webrtc/p2p/p2p.gyp b/webrtc/p2p/p2p.gyp index 9812a0acb7..5c9a575f8f 100644 --- a/webrtc/p2p/p2p.gyp +++ b/webrtc/p2p/p2p.gyp @@ -145,6 +145,52 @@ 'sources': [ 'stunprober/main.cc', ], - }], + }, + ], # targets + 'conditions': [ + ['include_tests==1', { + 'targets' : [ + { + 'target_name': 'rtc_p2p_unittest', + 'type': 'none', + 'direct_dependent_settings': { + 'sources': [ + 'base/dtlstransportchannel_unittest.cc', + 'base/faketransportcontroller.h', + 'base/p2ptransportchannel_unittest.cc', + 'base/port_unittest.cc', + 'base/pseudotcp_unittest.cc', + 'base/relayport_unittest.cc', + 'base/relayserver_unittest.cc', + 'base/stun_unittest.cc', + 'base/stunport_unittest.cc', + 'base/stunrequest_unittest.cc', + 'base/stunserver_unittest.cc', + 'base/testrelayserver.h', + 'base/teststunserver.h', + 'base/testturnserver.h', + 'base/transport_unittest.cc', + 'base/transportcontroller_unittest.cc', + 'base/transportdescriptionfactory_unittest.cc', + 'base/turnport_unittest.cc', + 'client/fakeportallocator.h', + 'client/portallocator_unittest.cc', + 'stunprober/stunprober_unittest.cc', + ], + 'conditions': [ + ['use_quic==1', { + 'sources': [ + 'quic/quicconnectionhelper_unittest.cc', + 'quic/quicsession_unittest.cc', + 'quic/quictransportchannel_unittest.cc', + 'quic/reliablequicstream_unittest.cc', + ], + }], + ], + }, + }, # target rtc_p2p_unittest + ], # targets + }], # include_tests==1 + ], # conditions } diff --git a/webrtc/p2p/p2p_tests.gypi b/webrtc/p2p/p2p_tests.gypi deleted file mode 100644 index 713d6e4d3e..0000000000 --- a/webrtc/p2p/p2p_tests.gypi +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (c) 2014 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': 'rtc_p2p_unittest', - 'type': 'none', - 'direct_dependent_settings': { - 'sources': [ - 'base/dtlstransportchannel_unittest.cc', - 'base/faketransportcontroller.h', - 'base/p2ptransportchannel_unittest.cc', - 'base/port_unittest.cc', - 'base/pseudotcp_unittest.cc', - 'base/relayport_unittest.cc', - 'base/relayserver_unittest.cc', - 'base/stun_unittest.cc', - 'base/stunport_unittest.cc', - 'base/stunrequest_unittest.cc', - 'base/stunserver_unittest.cc', - 'base/testrelayserver.h', - 'base/teststunserver.h', - 'base/testturnserver.h', - 'base/transport_unittest.cc', - 'base/transportcontroller_unittest.cc', - 'base/transportdescriptionfactory_unittest.cc', - 'base/turnport_unittest.cc', - 'client/fakeportallocator.h', - 'client/portallocator_unittest.cc', - 'stunprober/stunprober_unittest.cc', - ], - 'conditions': [ - ['use_quic==1', { - 'sources': [ - 'quic/quicconnectionhelper_unittest.cc', - 'quic/quicsession_unittest.cc', - 'quic/quictransportchannel_unittest.cc', - 'quic/reliablequicstream_unittest.cc', - ], - }], - ], - }, - }, - ], -} - diff --git a/webrtc/pc/pc.gyp b/webrtc/pc/pc.gyp index 40874b1a45..14038060de 100755 --- a/webrtc/pc/pc.gyp +++ b/webrtc/pc/pc.gyp @@ -72,5 +72,76 @@ 'voicechannel.h', ], }, # target rtc_pc - ], + ], # targets + 'conditions': [ + ['include_tests==1', { + 'targets' : [ + { + 'target_name': 'rtc_pc_unittests', + 'type': 'executable', + 'dependencies': [ + '<(webrtc_root)/api/api.gyp:libjingle_peerconnection', + '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils', + '<(webrtc_root)/media/media.gyp:rtc_unittest_main', + '<(webrtc_root)/pc/pc.gyp:rtc_pc', + ], + 'include_dirs': [ + '<(DEPTH)/third_party/libsrtp/srtp', + ], + 'sources': [ + 'bundlefilter_unittest.cc', + 'channel_unittest.cc', + 'channelmanager_unittest.cc', + 'currentspeakermonitor_unittest.cc', + 'mediasession_unittest.cc', + 'rtcpmuxfilter_unittest.cc', + 'srtpfilter_unittest.cc', + ], + # TODO(kjellander): Make the code compile without disabling these flags. + # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307 + 'cflags_cc!': [ + '-Wnon-virtual-dtor', + ], + 'conditions': [ + ['clang==0', { + 'cflags': [ + '-Wno-maybe-uninitialized', # Only exists for GCC. + ], + }], + ['build_libsrtp==1', { + 'dependencies': [ + '<(DEPTH)/third_party/libsrtp/libsrtp.gyp:libsrtp', + ], + }], + ['OS=="win"', { + 'msvs_settings': { + 'VCLinkerTool': { + 'AdditionalDependencies': [ + 'strmiids.lib', + ], + }, + }, + }], + ], + }, # target rtc_pc_unittests + ], # targets + }], # include_tests==1 + ['test_isolation_mode != "noop"', { + 'targets': [ + { + 'target_name': 'rtc_pc_unittests_run', + 'type': 'none', + 'dependencies': [ + 'rtc_pc_unittests', + ], + 'includes': [ + '../build/isolate.gypi', + ], + 'sources': [ + 'rtc_pc_unittests.isolate', + ], + }, + ], + }], + ], # conditions } diff --git a/webrtc/pc/pc_tests.gypi b/webrtc/pc/pc_tests.gypi deleted file mode 100755 index 416fd2b5b1..0000000000 --- a/webrtc/pc/pc_tests.gypi +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) 2016 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': 'rtc_pc_unittests', - 'type': 'executable', - 'dependencies': [ - '<(webrtc_root)/api/api.gyp:libjingle_peerconnection', - '<(webrtc_root)/base/base_tests.gyp:rtc_base_tests_utils', - '<(webrtc_root)/webrtc.gyp:rtc_unittest_main', - '<(webrtc_root)/pc/pc.gyp:rtc_pc', - ], - 'include_dirs': [ - '<(DEPTH)/third_party/libsrtp/srtp', - ], - 'sources': [ - 'bundlefilter_unittest.cc', - 'channel_unittest.cc', - 'channelmanager_unittest.cc', - 'currentspeakermonitor_unittest.cc', - 'mediasession_unittest.cc', - 'rtcpmuxfilter_unittest.cc', - 'srtpfilter_unittest.cc', - ], - # TODO(kjellander): Make the code compile without disabling these flags. - # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307 - 'cflags_cc!': [ - '-Wnon-virtual-dtor', - ], - 'conditions': [ - ['clang==0', { - 'cflags': [ - '-Wno-maybe-uninitialized', # Only exists for GCC. - ], - }], - ['build_libsrtp==1', { - 'dependencies': [ - '<(DEPTH)/third_party/libsrtp/libsrtp.gyp:libsrtp', - ], - }], - ['OS=="win"', { - 'msvs_settings': { - 'VCLinkerTool': { - 'AdditionalDependencies': [ - 'strmiids.lib', - ], - }, - }, - }], - ], - }, # target rtc_pc_unittests - ], -} diff --git a/webrtc/rtc_pc_unittests.isolate b/webrtc/pc/rtc_pc_unittests.isolate similarity index 100% rename from webrtc/rtc_pc_unittests.isolate rename to webrtc/pc/rtc_pc_unittests.isolate diff --git a/webrtc/webrtc.gyp b/webrtc/webrtc.gyp index 8c10f0267b..7591f22071 100644 --- a/webrtc/webrtc.gyp +++ b/webrtc/webrtc.gyp @@ -36,11 +36,6 @@ }], ['include_tests==1', { 'includes': [ - 'libjingle/xmllite/xmllite_tests.gypi', - 'libjingle/xmpp/xmpp_tests.gypi', - 'media/media_tests.gypi', - 'p2p/p2p_tests.gypi', - 'pc/pc_tests.gypi', 'webrtc_tests.gypi', ], }], diff --git a/webrtc/webrtc_tests.gypi b/webrtc/webrtc_tests.gypi index cf72d2ee56..7840e80b5e 100644 --- a/webrtc/webrtc_tests.gypi +++ b/webrtc/webrtc_tests.gypi @@ -18,9 +18,9 @@ 'libjingle/xmpp/xmpp.gyp:rtc_xmpp', 'p2p/p2p.gyp:rtc_p2p', 'p2p/p2p.gyp:libstunprober', - 'rtc_p2p_unittest', - 'rtc_xmllite_unittest', - 'rtc_xmpp_unittest', + 'p2p/p2p.gyp:rtc_p2p_unittest', + 'libjingle/xmllite/xmllite.gyp:rtc_xmllite_unittest', + 'libjingle/xmpp/xmpp.gyp:rtc_xmpp_unittest', '<(DEPTH)/testing/gtest.gyp:gtest', '<(DEPTH)/testing/gmock.gyp:gmock', ], @@ -359,32 +359,6 @@ 'rtc_unittests.isolate', ], }, - { - 'target_name': 'rtc_media_unittests_run', - 'type': 'none', - 'dependencies': [ - 'rtc_media_unittests', - ], - 'includes': [ - 'build/isolate.gypi', - ], - 'sources': [ - 'rtc_media_unittests.isolate', - ], - }, - { - 'target_name': 'rtc_pc_unittests_run', - 'type': 'none', - 'dependencies': [ - 'rtc_pc_unittests', - ], - 'includes': [ - 'build/isolate.gypi', - ], - 'sources': [ - 'rtc_pc_unittests.isolate', - ], - }, { 'target_name': 'video_engine_tests_run', 'type': 'none',