Make it possible to run peerconnection_unittests on Android.

- renamed libjingle_peerconnection_unittest to peerconnection_unittest to circumvent cr issue http://crbug.com/543820

TEST=On an android build webrtc/build/android/test_runner.py gtest -s peerconnection_unittests --verbose -t 900
BUG=webrtc:2365,543820
NOTRY=True

Review URL: https://codereview.webrtc.org/1602443004

Cr-Commit-Position: refs/heads/master@{#11304}
This commit is contained in:
perkj 2016-01-19 06:20:00 -08:00 committed by Commit bot
parent 0edb05b344
commit 8a2c31d208
7 changed files with 18 additions and 60 deletions

View File

@ -187,7 +187,7 @@
],
}, # target libjingle_p2p_unittest
{
'target_name': 'libjingle_peerconnection_unittest',
'target_name': 'peerconnection_unittests',
'type': '<(gtest_target_type)',
'dependencies': [
'<(DEPTH)/testing/gmock.gyp:gmock',
@ -260,7 +260,7 @@
},
}],
],
}, # target libjingle_peerconnection_unittest
}, # target peerconnection_unittests
],
'conditions': [
['OS=="linux"', {
@ -415,10 +415,10 @@
['OS=="android"', {
'targets': [
{
'target_name': 'libjingle_peerconnection_unittest_apk_target',
'target_name': 'peerconnection_unittests_apk_target',
'type': 'none',
'dependencies': [
'<(DEPTH)/webrtc/build/apk_tests.gyp:libjingle_peerconnection_unittest_apk',
'<(DEPTH)/webrtc/build/apk_tests.gyp:peerconnection_unittests_apk',
],
},
],
@ -452,16 +452,16 @@
],
},
{
'target_name': 'libjingle_peerconnection_unittest_run',
'target_name': 'peerconnection_unittests_run',
'type': 'none',
'dependencies': [
'libjingle_peerconnection_unittest',
'peerconnection_unittests',
],
'includes': [
'build/isolate.gypi',
],
'sources': [
'libjingle_peerconnection_unittest.isolate',
'peerconnection_unittests.isolate',
],
},
],

View File

@ -29,10 +29,10 @@
['OS=="linux" or OS=="mac" or OS=="win"', {
'variables': {
'command': [
'<(PRODUCT_DIR)/libjingle_peerconnection_unittest<(EXECUTABLE_SUFFIX)',
'<(PRODUCT_DIR)/peerconnection_unittests<(EXECUTABLE_SUFFIX)',
],
'files': [
'<(PRODUCT_DIR)/libjingle_peerconnection_unittest<(EXECUTABLE_SUFFIX)',
'<(PRODUCT_DIR)/peerconnection_unittests<(EXECUTABLE_SUFFIX)',
],
},
}],

View File

@ -38,8 +38,8 @@ def main():
'webrtc/common_audio/common_audio_unittests.isolate',
'common_video_unittests':
'webrtc/common_video/common_video_unittests.isolate',
'libjingle_peerconnection_unittest':
'talk/libjingle_peerconnection_unittest.isolate',
'peerconnection_unittests':
'talk/peerconnection_unittests.isolate',
'modules_tests': 'webrtc/modules/modules_tests.isolate',
'modules_unittests': 'webrtc/modules/modules_unittests.isolate',
'rtc_unittests': 'webrtc/rtc_unittests.isolate',

View File

@ -1,40 +0,0 @@
# 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.
# This is almost an identical copy of src/build/apk_test.gypi with minor
# modifications to allow test executables starting with "lib".
# See http://crbug.com/543820 for more details.
{
'dependencies': [
'<(DEPTH)/base/base.gyp:base_java',
'<(DEPTH)/build/android/pylib/device/commands/commands.gyp:chromium_commands',
'<(DEPTH)/build/android/pylib/remote/device/dummy/dummy.gyp:remote_device_dummy_apk',
'<(DEPTH)/testing/android/appurify_support.gyp:appurify_support_java',
'<(DEPTH)/testing/android/on_device_instrumentation.gyp:reporter_java',
'<(DEPTH)/tools/android/android_tools.gyp:android_tools',
],
'conditions': [
['OS == "android"', {
'variables': {
# These are used to configure java_apk.gypi included below.
'test_type': 'gtest',
'apk_name': '<(test_suite_name)',
'intermediate_dir': '<(PRODUCT_DIR)/<(test_suite_name)_apk',
'final_apk_path': '<(intermediate_dir)/<(test_suite_name)-debug.apk',
'java_in_dir': '<(DEPTH)/testing/android/native_test/java',
'native_lib_target': '<(test_suite_name)',
'gyp_managed_install': 0,
},
'includes': [
'../../build/java_apk.gypi',
'../../build/android/test_runner.gypi',
],
}], # 'OS == "android"
], # conditions
}

View File

@ -61,20 +61,18 @@
],
},
{
'target_name': 'libjingle_peerconnection_unittest_apk',
'target_name': 'peerconnection_unittests_apk',
'type': 'none',
'variables': {
'test_suite_name': 'libjingle_peerconnection_unittest',
'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)libjingle_peerconnection_unittest<(SHARED_LIB_SUFFIX)',
'test_suite_name': 'peerconnection_unittests',
'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)peerconnection_unittests<(SHARED_LIB_SUFFIX)',
},
'dependencies': [
'<(DEPTH)/talk/libjingle_tests.gyp:libjingle_peerconnection_unittest',
'<(DEPTH)/talk/libjingle_tests.gyp:peerconnection_unittests',
'<(DEPTH)/talk/libjingle.gyp:libjingle_peerconnection_java',
],
'includes': [
# Use webrtc copy of apk_test.gypi to allow test executables starting
# with "lib". See http://crbug.com/543820 for more details.
'../build/apk_test.gypi',
'../../build/apk_test.gypi',
],
},
{

View File

@ -22,7 +22,7 @@
'type': 'none',
},
{
'target_name': 'libjingle_peerconnection_unittest_apk',
'target_name': 'peerconnection_unittests_apk',
'type': 'none',
},
{

View File

@ -80,7 +80,7 @@ char kLSanDefaultSuppressions[] =
"leak:WebRtcVideoEngineTestFake_SetBandwidthInConference_Test::TestBody\n"
"leak:WebRtcVideoEngineTestFake_SetSendCodecsRejectBadFormat_Test::TestBody\n"
// libjingle_peerconnection_unittest
// peerconnection_unittests
// https://code.google.com/p/webrtc/issues/detail?id=2528
"leak:cricket::FakeVideoMediaChannel::~FakeVideoMediaChannel\n"
"leak:cricket::MediaSessionDescriptionFactory::CreateAnswer\n"