| Index: webrtc/api/api_tests.gyp
|
| diff --git a/webrtc/api/api_tests.gyp b/webrtc/api/api_tests.gyp
|
| index c2c18bc69328412044464ce71f8b5335acf4f77f..f1e305c646be651e6ecabac004b15b626b04f79a 100644
|
| --- a/webrtc/api/api_tests.gyp
|
| +++ b/webrtc/api/api_tests.gyp
|
| @@ -8,7 +8,205 @@
|
|
|
| {
|
| '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',
|
| + '../../talk/libjingle.gyp:libjingle',
|
| + '../../talk/libjingle.gyp:libjingle_p2p',
|
| + '../../talk/libjingle_tests.gyp:libjingle_unittest_main',
|
| + ],
|
| + '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',
|
| + 'mediastream_unittest.cc',
|
| + 'peerconnection_unittest.cc',
|
| + 'peerconnectionendtoend_unittest.cc',
|
| + 'peerconnectionfactory_unittest.cc',
|
| + 'peerconnectioninterface_unittest.cc',
|
| + # 'peerconnectionproxy_unittest.cc',
|
| + 'remotevideocapturer_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',
|
| + 'videosource_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=="linux"', {
|
| + 'variables': {
|
| + 'junit_jar': '<(DEPTH)/third_party/junit-jar/junit-4.11.jar',
|
| + },
|
| + 'targets': [
|
| + {
|
| + 'target_name': 'libjingle_peerconnection_test_jar',
|
| + 'type': 'none',
|
| + 'dependencies': [
|
| + '<(webrtc_root)/api/api.gyp:libjingle_peerconnection_jar',
|
| + ],
|
| + 'actions': [
|
| + {
|
| + 'variables': {
|
| + 'java_src_dir': 'javatests/src',
|
| + 'java_files': [
|
| + 'java/testcommon/src/org/webrtc/PeerConnectionTest.java',
|
| + 'javatests/src/org/webrtc/PeerConnectionTestJava.java',
|
| + ],
|
| + },
|
| + 'action_name': 'create_jar',
|
| + 'inputs': [
|
| + '../build/build_jar.sh',
|
| + '<@(java_files)',
|
| + '<(PRODUCT_DIR)/libjingle_peerconnection.jar',
|
| + '<(PRODUCT_DIR)/lib/libjingle_peerconnection_so.so',
|
| + '<(junit_jar)',
|
| + ],
|
| + 'outputs': [
|
| + '<(PRODUCT_DIR)/libjingle_peerconnection_test.jar',
|
| + ],
|
| + 'action': [
|
| + '../build/build_jar.sh', '<(java_home)', '<@(_outputs)',
|
| + '<(INTERMEDIATE_DIR)',
|
| + '<(java_src_dir):<(PRODUCT_DIR)/libjingle_peerconnection.jar:<(junit_jar)',
|
| + '<@(java_files)'
|
| + ],
|
| + },
|
| + ], # actions
|
| + }, # target libjingle_peerconnection_test_jar
|
| + {
|
| + 'target_name': 'libjingle_peerconnection_java_unittest',
|
| + 'type': 'none',
|
| + 'actions': [
|
| + {
|
| + 'action_name': 'copy libjingle_peerconnection_java_unittest',
|
| + 'inputs': [
|
| + 'javatests/libjingle_peerconnection_java_unittest.sh',
|
| + '<(PRODUCT_DIR)/libjingle_peerconnection_test_jar',
|
| + '<(junit_jar)',
|
| + ],
|
| + 'outputs': [
|
| + '<(PRODUCT_DIR)/libjingle_peerconnection_java_unittest',
|
| + ],
|
| + 'action': [
|
| + 'bash', '-c',
|
| + 'rm -f <(PRODUCT_DIR)/libjingle_peerconnection_java_unittest && '
|
| + 'sed -e "s@GYP_JAVA_HOME@<(java_home)@" '
|
| + '< javatests/libjingle_peerconnection_java_unittest.sh '
|
| + '> <(PRODUCT_DIR)/libjingle_peerconnection_java_unittest && '
|
| + 'cp <(junit_jar) <(PRODUCT_DIR) && '
|
| + 'chmod u+x <(PRODUCT_DIR)/libjingle_peerconnection_java_unittest'
|
| + ],
|
| + },
|
| + ], # actions
|
| + }, # target libjingle_peerconnection_java_unittest
|
| + ], # targets
|
| + }], # OS=="linux"
|
| + ['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',
|
| + 'additional_src_dirs': ['java/testcommon'],
|
| + 'native_lib_target': 'libjingle_peerconnection_so',
|
| + 'is_test_apk': 1,
|
| + 'never_lint': 1,
|
| + },
|
| + 'includes': [ '../../build/java_apk.gypi' ],
|
| + },
|
| + ], # targets
|
| + }], # OS=="android"
|
| ['OS=="ios"', {
|
| 'targets': [
|
| {
|
| @@ -33,8 +231,36 @@
|
| # 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=="ios"
|
| - ],
|
| + }], # 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
|
| }
|
|
|