Re-land "Remove <(webrtc_root) from source file entries."

Changes differing from https://webrtc-codereview.appspot.com/37859004:
* I put the include_tests==1 stuff of audio_coding.gypi in its
  own audio_coding_tests.gypi file, including the Android and isolate
  targets which were incorrectly located in the previous CL
* I moved the bwe utilities in remote_bitrate_estimator.gypi
  into include_tests==1 since they depend on test.gyp after I
  cleaned up the duplicated inclusion of rtp_file_reader.cc

R=stefan@webrtc.org
TBR=tina.legrand@webrtc.org
TESTED=Passing gyp and compile using:
webrtc/build/gyp_webrtc -Dinclude_tests=1
webrtc/build/gyp_webrtc -Dinclude_tests=0
I also setup a Chromium checkout with my checkout mounted in
third_party/webrtc and ran build/gyp_chromium successfully.

BUG=4185

Review URL: https://webrtc-codereview.appspot.com/33159004

Cr-Commit-Position: refs/heads/master@{#8205}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8205 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kjellander@webrtc.org 2015-01-29 14:29:45 +00:00
parent bdebccf384
commit a33f05e8d7
19 changed files with 201 additions and 169 deletions

View File

@ -127,7 +127,7 @@ def _CheckNoSourcesAboveGyp(input_api, gyp_files, output_api):
# Disallow referencing source files with paths above the GYP file location.
source_pattern = input_api.re.compile(r'sources.*?\[(.*?)\]',
re.MULTILINE | re.DOTALL)
file_pattern = input_api.re.compile(r"'(\.\./.*?)'")
file_pattern = input_api.re.compile(r"'((\.\./.*?)|(<\(webrtc_root\).*?))'")
violating_gyp_files = set()
violating_source_entries = []
for gyp_file in gyp_files:

View File

@ -0,0 +1,29 @@
# 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',
'codecs/interfaces.gypi',
'codecs/cng/cng.gypi',
'codecs/g711/g711.gypi',
'codecs/g722/g722.gypi',
'codecs/ilbc/ilbc.gypi',
'codecs/isac/main/source/isac.gypi',
'codecs/isac/fix/source/isacfix.gypi',
'codecs/pcm16b/pcm16b.gypi',
'codecs/red/red.gypi',
'main/acm2/audio_coding_module.gypi',
'neteq/neteq.gypi',
],
'conditions': [
['include_opus==1', {
'includes': ['codecs/opus/opus.gypi',],
}],
],
}

View File

@ -0,0 +1,72 @@
# 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',
'codecs/isac/isac_test.gypi',
'codecs/isac/isacfix_test.gypi',
],
'targets': [
{
'target_name': 'audio_codec_speed_tests',
'type': '<(gtest_target_type)',
'dependencies': [
'audio_processing',
'iSACFix',
'webrtc_opus',
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/test/test.gyp:test_support_main',
],
'sources': [
'codecs/isac/fix/test/isac_speed_test.cc',
'codecs/opus/opus_speed_test.cc',
'codecs/tools/audio_codec_speed_test.h',
'codecs/tools/audio_codec_speed_test.cc',
],
'conditions': [
['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
}],
],
},
],
'conditions': [
['OS=="android"', {
'targets': [
{
'target_name': 'audio_codec_speed_tests_apk_target',
'type': 'none',
'dependencies': [
'<(apk_tests_path):audio_codec_speed_tests_apk',
],
},
],
}],
['test_isolation_mode != "noop"', {
'targets': [
{
'target_name': 'audio_codec_speed_tests_run',
'type': 'none',
'dependencies': [
'audio_codec_speed_tests',
],
'includes': [
'../../build/isolate.gypi',
],
'sources': [
'audio_codec_speed_tests.isolate',
],
},
],
}],
],
}

View File

@ -1,66 +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.
{
'targets': [
{
'target_name': 'audio_codec_speed_tests',
'type': '<(gtest_target_type)',
'dependencies': [
'audio_processing',
'iSACFix',
'webrtc_opus',
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/test/test.gyp:test_support_main',
],
'sources': [
'audio_codec_speed_test.h',
'audio_codec_speed_test.cc',
'<(webrtc_root)/modules/audio_coding/codecs/opus/opus_speed_test.cc',
'<(webrtc_root)/modules/audio_coding/codecs/isac/fix/test/isac_speed_test.cc',
],
'conditions': [
['OS=="android"', {
'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
],
}],
],
}],
'conditions': [
['OS=="android"', {
'targets': [
{
'target_name': 'audio_codec_speed_tests_apk_target',
'type': 'none',
'dependencies': [
'<(apk_tests_path):audio_codec_speed_tests_apk',
],
},
],
}],
['test_isolation_mode != "noop"', {
'targets': [
{
'target_name': 'audio_codec_speed_tests_run',
'type': 'none',
'dependencies': [
'audio_codec_speed_tests',
],
'includes': [
'../../../../build/isolate.gypi',
],
'sources': [
'audio_codec_speed_tests.isolate',
],
},
],
}],
],
}

View File

@ -9,17 +9,7 @@
{
'includes': [
'../build/common.gypi',
'audio_coding/codecs/interfaces.gypi',
'audio_coding/codecs/cng/cng.gypi',
'audio_coding/codecs/g711/g711.gypi',
'audio_coding/codecs/g722/g722.gypi',
'audio_coding/codecs/ilbc/ilbc.gypi',
'audio_coding/codecs/isac/main/source/isac.gypi',
'audio_coding/codecs/isac/fix/source/isacfix.gypi',
'audio_coding/codecs/pcm16b/pcm16b.gypi',
'audio_coding/codecs/red/red.gypi',
'audio_coding/main/acm2/audio_coding_module.gypi',
'audio_coding/neteq/neteq.gypi',
'audio_coding/audio_coding.gypi',
'audio_conference_mixer/source/audio_conference_mixer.gypi',
'audio_device/audio_device.gypi',
'audio_processing/audio_processing.gypi',
@ -37,14 +27,9 @@
'video_render/video_render.gypi',
],
'conditions': [
['include_opus==1', {
'includes': ['audio_coding/codecs/opus/opus.gypi',],
}],
['include_tests==1', {
'includes': [
'audio_coding/codecs/isac/isac_test.gypi',
'audio_coding/codecs/isac/isacfix_test.gypi',
'audio_coding/codecs/tools/audio_codec_speed_tests.gypi',
'audio_coding/audio_coding_tests.gypi',
'audio_processing/audio_processing_tests.gypi',
'rtp_rtcp/test/testFec/test_fec.gypi',
'video_coding/main/source/video_coding_test.gypi',
@ -101,6 +86,7 @@
'<(webrtc_root)/test/test.gyp:frame_generator',
'<(webrtc_root)/test/test.gyp:rtp_test_utils',
'<(webrtc_root)/test/test.gyp:test_support_main',
'<(webrtc_root)/tools/tools.gyp:agc_test_utils',
],
'sources': [
'audio_coding/codecs/cng/audio_encoder_cng_unittest.cc',
@ -175,7 +161,6 @@
'audio_processing/agc/pitch_internal_unittest.cc',
'audio_processing/agc/pole_zero_filter_unittest.cc',
'audio_processing/agc/standalone_vad_unittest.cc',
'audio_processing/agc/test/test_utils.cc',
'audio_processing/beamformer/complex_matrix_unittest.cc',
'audio_processing/beamformer/covariance_matrix_generator_unittest.cc',
'audio_processing/beamformer/matrix_unittest.cc',

View File

@ -40,63 +40,67 @@
'test/bwe_test_logging.h',
], # source
},
{
'target_name': 'bwe_tools_util',
'type': 'static_library',
'dependencies': [
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'rtp_rtcp',
],
'sources': [
'tools/bwe_rtp.cc',
'tools/bwe_rtp.h',
],
},
{
'target_name': 'bwe_rtp_to_text',
'type': 'executable',
'includes': [
'../rtp_rtcp/source/rtp_rtcp.gypi',
],
'dependencies': [
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers_default',
'bwe_tools_util',
'rtp_rtcp',
],
'direct_dependent_settings': {
'include_dirs': [
'include',
],
},
'sources': [
'tools/rtp_to_text.cc',
'<(webrtc_root)/test/rtp_file_reader.cc',
'<(webrtc_root)/test/rtp_file_reader.h',
], # source
},
{
'target_name': 'bwe_rtp_play',
'type': 'executable',
'includes': [
'../rtp_rtcp/source/rtp_rtcp.gypi',
],
'dependencies': [
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers_default',
'bwe_tools_util',
'rtp_rtcp',
],
'direct_dependent_settings': {
'include_dirs': [
'include',
],
},
'sources': [
'tools/bwe_rtp_play.cc',
'<(webrtc_root)/test/rtp_file_reader.cc',
'<(webrtc_root)/test/rtp_file_reader.h',
], # source
},
], # targets
'conditions': [
['include_tests==1', {
'targets': [
{
'target_name': 'bwe_tools_util',
'type': 'static_library',
'dependencies': [
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'rtp_rtcp',
],
'sources': [
'tools/bwe_rtp.cc',
'tools/bwe_rtp.h',
],
},
{
'target_name': 'bwe_rtp_to_text',
'type': 'executable',
'includes': [
'../rtp_rtcp/source/rtp_rtcp.gypi',
],
'dependencies': [
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers_default',
'<(webrtc_root)/test/test.gyp:rtp_test_utils',
'bwe_tools_util',
'rtp_rtcp',
],
'direct_dependent_settings': {
'include_dirs': [
'include',
],
},
'sources': [
'tools/rtp_to_text.cc',
], # source
},
{
'target_name': 'bwe_rtp_play',
'type': 'executable',
'includes': [
'../rtp_rtcp/source/rtp_rtcp.gypi',
],
'dependencies': [
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers_default',
'<(webrtc_root)/test/test.gyp:rtp_test_utils',
'bwe_tools_util',
'rtp_rtcp',
],
'direct_dependent_settings': {
'include_dirs': [
'include',
],
},
'sources': [
'tools/bwe_rtp_play.cc',
], # source
},
],
}], # include_tests==1
],
}

View File

@ -12,12 +12,12 @@
#include "gflags/gflags.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_processing/agc/test/agc_manager.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
#include "webrtc/system_wrappers/interface/sleep.h"
#include "webrtc/system_wrappers/interface/trace.h"
#include "webrtc/test/channel_transport/include/channel_transport.h"
#include "webrtc/test/testsupport/trace_to_stderr.h"
#include "webrtc/tools/agc/agc_manager.h"
#include "webrtc/voice_engine/include/voe_audio_processing.h"
#include "webrtc/voice_engine/include/voe_base.h"
#include "webrtc/voice_engine/include/voe_codec.h"

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/modules/audio_processing/agc/test/agc_manager.h"
#include "webrtc/tools/agc/agc_manager.h"
#include <assert.h>

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_TEST_AGC_MANAGER_H_
#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_TEST_AGC_MANAGER_H_
#ifndef WEBRTC_TOOLS_AGC_AGC_MANAGER_H_
#define WEBRTC_TOOLS_AGC_AGC_MANAGER_H_
#include "webrtc/modules/audio_processing/agc/agc_manager_direct.h"
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
@ -78,4 +78,4 @@ class AgcManager {
} // namespace webrtc
#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_TEST_AGC_MANAGER_H_
#endif // WEBRTC_TOOLS_AGC_AGC_MANAGER_H_

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/modules/audio_processing/agc/test/agc_manager.h"
#include "webrtc/tools/agc/agc_manager.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/modules/audio_processing/agc/test/agc_manager.h"
#include "webrtc/tools/agc/agc_manager.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

View File

@ -16,13 +16,13 @@
#include "gflags/gflags.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/modules/audio_processing/agc/agc.h"
#include "webrtc/modules/audio_processing/agc/test/agc_manager.h"
#include "webrtc/modules/audio_processing/agc/test/test_utils.h"
#include "webrtc/modules/audio_processing/agc/utility.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/modules/interface/module_common_types.h"
#include "webrtc/system_wrappers/interface/logging.h"
#include "webrtc/test/testsupport/trace_to_stderr.h"
#include "webrtc/tools/agc/agc_manager.h"
#include "webrtc/tools/agc/test_utils.h"
#include "webrtc/voice_engine/include/mock/fake_voe_external_media.h"
#include "webrtc/voice_engine/include/mock/mock_voe_volume_control.h"

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_TEST_FAKE_AGC_H_
#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_TEST_FAKE_AGC_H_
#ifndef WEBRTC_TOOLS_AGC_FAKE_AGC_H_
#define WEBRTC_TOOLS_AGC_FAKE_AGC_H_
#include "webrtc/modules/audio_processing/agc/agc.h"
@ -43,4 +43,4 @@ class FakeAgc : public Agc {
} // namespace webrtc
#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_TEST_FAKE_AGC_H_
#endif // WEBRTC_TOOLS_AGC_FAKE_AGC_H_

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/modules/audio_processing/agc/test/test_utils.h"
#include "webrtc/tools/agc/test_utils.h"
#include <cmath>

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_
#define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_
#ifndef WEBRTC_TOOLS_AGC_TEST_UTILS_H_
#define WEBRTC_TOOLS_AGC_TEST_UTILS_H_
namespace webrtc {
class AudioFrame;
@ -25,4 +25,4 @@ void SimulateMic(int gain_map[255], int mic_level, int last_mic_level,
} // namespace webrtc
#endif // WEBRTC_MODULES_AUDIO_PROCESSING_TEST_TEST_UTILS_H_
#endif // WEBRTC_TOOLS_AGC_TEST_UTILS_H_

View File

@ -110,8 +110,16 @@
'<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine',
],
'sources': [
'<(webrtc_root)/modules/audio_processing/agc/test/agc_manager.cc',
'<(webrtc_root)/modules/audio_processing/agc/test/agc_manager.h',
'agc/agc_manager.cc',
'agc/agc_manager.h',
],
},
{
'target_name': 'agc_test_utils',
'type': 'static_library',
'sources': [
'agc/test_utils.cc',
'agc/test_utils.h',
],
},
{
@ -126,7 +134,7 @@
'agc_manager',
],
'sources': [
'<(webrtc_root)/modules/audio_processing/agc/test/agc_harness.cc',
'agc/agc_harness.cc',
],
}, # agc_harness
{
@ -139,10 +147,10 @@
'<(webrtc_root)/test/test.gyp:test_support',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers_default',
'agc_manager',
'agc_test_utils',
],
'sources': [
'<(webrtc_root)/modules/audio_processing/agc/test/agc_test.cc',
'<(webrtc_root)/modules/audio_processing/agc/test/test_utils.cc',
'agc/agc_test.cc',
],
}, # agc_proc
{
@ -154,7 +162,7 @@
'agc_manager',
],
'sources': [
'<(webrtc_root)/modules/audio_processing/agc/test/activity_metric.cc',
'agc/activity_metric.cc',
],
}, # activity_metric
{

View File

@ -96,13 +96,13 @@
'target_name': 'video_engine_tests',
'type': '<(gtest_target_type)',
'sources': [
'modules/audio_processing/agc/test/agc_manager_unittest.cc',
'test/common_unittest.cc',
'test/testsupport/metrics/video_metrics_unittest.cc',
'tools/agc/agc_manager_unittest.cc',
'video/bitrate_estimator_tests.cc',
'video/end_to_end_tests.cc',
'video/send_statistics_proxy_unittest.cc',
'video/video_send_stream_tests.cc',
'test/common_unittest.cc',
'test/testsupport/metrics/video_metrics_unittest.cc',
],
'dependencies': [
'<(DEPTH)/testing/gmock.gyp:gmock',
@ -131,7 +131,7 @@
'type': '<(gtest_target_type)',
'sources': [
'modules/audio_coding/neteq/test/neteq_performance_unittest.cc',
'modules/audio_processing/agc/test/agc_manager_integrationtest.cc',
'tools/agc/agc_manager_integrationtest.cc',
'video/call_perf_tests.cc',
'video/full_stack.cc',
'video/rampup_tests.cc',