GN: Fix test_support_unittests and MIPS compile issue.

Move the webrtc/test/test_support/metrics sources into
test_support[_unittests] targets.
This is essentially reverting https://webrtc-codereview.appspot.com/5789004
and moving these sources back to the right target.

Add missing foreman_cif.yuv resource needed for these tests.

For MIPS, a compile error was surfacing for logcat_trace_context.h when
flipping bot to GN, which was fixed.

BUG=webrtc:5949
NOTRY=True

Review-Url: https://codereview.webrtc.org/2267113002
Cr-Commit-Position: refs/heads/master@{#13860}
This commit is contained in:
kjellander
2016-08-23 04:52:11 -07:00
committed by Commit bot
parent 84c03bafcf
commit d8dd190a08
10 changed files with 11 additions and 41 deletions

View File

@ -49,7 +49,6 @@
'webrtc/api/api_tests.gyp:*',
'webrtc/common_video/common_video_unittests.gyp:*',
'webrtc/system_wrappers/system_wrappers_tests.gyp:*',
'webrtc/test/metrics.gyp:*',
'webrtc/test/test.gyp:*',
],
}],

View File

@ -65,7 +65,6 @@
'<(webrtc_root)/common_video/common_video.gyp:common_video',
'<(webrtc_root)/modules/video_coding/codecs/vp8/vp8.gyp:webrtc_vp8',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/test/metrics.gyp:metrics',
'<(webrtc_root)/test/test.gyp:test_support',
'<(webrtc_root)/test/test.gyp:test_support_main',
'audio_coding_module',

View File

@ -19,7 +19,7 @@
'<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
'<(webrtc_root)/common.gyp:webrtc_common',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers_default',
'<(webrtc_root)/test/metrics.gyp:metrics',
'<(webrtc_root)/test/test.gyp:test_support',
'<(webrtc_vp8_dir)/vp8.gyp:webrtc_vp8',
],
'sources': [

View File

@ -58,7 +58,6 @@
'dependencies': [
'webrtc_vp8',
'<(webrtc_root)/common_video/common_video.gyp:common_video',
'<(webrtc_root)/test/metrics.gyp:metrics',
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
'<(webrtc_root)/test/test.gyp:test_support_main',

View File

@ -24,10 +24,10 @@ namespace webrtc {
class LogcatTraceContext : public webrtc::TraceCallback {
public:
LogcatTraceContext();
virtual ~LogcatTraceContext();
~LogcatTraceContext() override;
// TraceCallback impl.
virtual void Print(TraceLevel level, const char* message, int length);
void Print(TraceLevel level, const char* message, int length) override;
};
} // namespace webrtc

View File

@ -318,6 +318,7 @@ test("test_support_unittests") {
# This needs to be kept in sync with the test_support_unittests.isolate file.
# TODO(kjellander); Move this to android_assets targets instead.
data = [
"//resources/foreman_cif_short.yuv",
"//resources/video_coding/frame-ethernet-ii.pcap",
"//resources/video_coding/frame-loopback.pcap",
"//resources/video_coding/pltype103.rtp",

View File

@ -1,32 +0,0 @@
# Copyright (c) 2011 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': [
{
# The metrics code must be kept in its own GYP file in order to
# avoid a circular dependency error due to the dependency on libyuv.
# If the code would be put in test.gyp a circular dependency error during
# GYP generation would occur, because the libyuv.gypi unittest target
# depends on test_support_main. See issue #160 for more info.
'target_name': 'metrics',
'type': 'static_library',
'dependencies': [
'<(webrtc_root)/common_video/common_video.gyp:common_video',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
],
'sources': [
'testsupport/metrics/video_metrics.h',
'testsupport/metrics/video_metrics.cc',
],
},
], # targets
}

View File

@ -127,6 +127,7 @@
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(webrtc_root)/base/base.gyp:gtest_prod',
'<(webrtc_root)/common_video/common_video.gyp:common_video',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
],
'sources': [
@ -137,6 +138,8 @@
'testsupport/frame_writer.cc',
'testsupport/frame_writer.h',
'testsupport/iosfileutils.mm',
'testsupport/metrics/video_metrics.h',
'testsupport/metrics/video_metrics.cc',
'testsupport/mock/mock_frame_reader.h',
'testsupport/mock/mock_frame_writer.h',
'testsupport/packet_reader.cc',
@ -207,6 +210,7 @@
'<(DEPTH)/testing/gtest.gyp:gtest',
],
'sources': [
'common_unittest.cc',
'fake_network_pipe_unittest.cc',
'frame_generator_unittest.cc',
'rtp_file_reader_unittest.cc',
@ -219,6 +223,7 @@
'testsupport/fileutils_unittest.cc',
'testsupport/frame_reader_unittest.cc',
'testsupport/frame_writer_unittest.cc',
'testsupport/metrics/video_metrics_unittest.cc',
'testsupport/packet_reader_unittest.cc',
'testsupport/perf_test_unittest.cc',
],

View File

@ -10,6 +10,7 @@
['OS=="linux" or OS=="mac" or OS=="win" or OS=="android"', {
'variables': {
'files': [
'<(DEPTH)/resources/foreman_cif_short.yuv',
'<(DEPTH)/resources/video_coding/frame-ethernet-ii.pcap',
'<(DEPTH)/resources/video_coding/frame-loopback.pcap',
'<(DEPTH)/resources/video_coding/pltype103.rtp',

View File

@ -366,8 +366,6 @@
'call/call_unittest.cc',
'call/packet_injection_tests.cc',
'call/ringbuffer_unittest.cc',
'test/common_unittest.cc',
'test/testsupport/metrics/video_metrics_unittest.cc',
'video/call_stats_unittest.cc',
'video/encoder_state_feedback_unittest.cc',
'video/end_to_end_tests.cc',
@ -392,9 +390,9 @@
'<(webrtc_root)/modules/modules.gyp:video_capture',
'<(webrtc_root)/test/test.gyp:channel_transport',
'<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine',
'test/metrics.gyp:metrics',
'test/test.gyp:test_common',
'test/test.gyp:test_main',
'test/test.gyp:test_support',
'webrtc',
],
'conditions': [