From f3cea2336b7b75179530357197a5bc6078526488 Mon Sep 17 00:00:00 2001 From: "phoglund@webrtc.org" Date: Tue, 20 Dec 2011 10:14:53 +0000 Subject: [PATCH] Added an empty voice engine unit test binary in order to get correct coverage measurements. This will make the voice engine show up in the coverage measurements. The empty test is necessary to get the coverage tool to pick it up (and it will be easier to start writing unit tests for the voice engine later). BUG= TEST= Review URL: http://webrtc-codereview.appspot.com/334003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1245 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../main/source/channel_unittest.cc | 15 +++++++++ .../main/source/voice_engine_core.gypi | 33 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 src/voice_engine/main/source/channel_unittest.cc diff --git a/src/voice_engine/main/source/channel_unittest.cc b/src/voice_engine/main/source/channel_unittest.cc new file mode 100644 index 0000000000..fc78679243 --- /dev/null +++ b/src/voice_engine/main/source/channel_unittest.cc @@ -0,0 +1,15 @@ +/* + * 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. + */ + +#include "channel.h" +#include "gtest/gtest.h" + +// Empty test just to get coverage metrics. +TEST(ChannelTest, EmptyTestToGetCodeCoverage) {} diff --git a/src/voice_engine/main/source/voice_engine_core.gypi b/src/voice_engine/main/source/voice_engine_core.gypi index e2c62aff6b..135d78b751 100644 --- a/src/voice_engine/main/source/voice_engine_core.gypi +++ b/src/voice_engine/main/source/voice_engine_core.gypi @@ -116,6 +116,39 @@ ], }, ], + 'conditions': [ + ['build_with_chromium==0', { + 'targets': [ + { + 'target_name': 'voice_engine_unittests', + 'type': 'executable', + 'dependencies': [ + 'voice_engine_core', + '<(webrtc_root)/common_audio/common_audio.gyp:resampler', + '<(webrtc_root)/common_audio/common_audio.gyp:signal_processing', + '<(webrtc_root)/modules/modules.gyp:audio_coding_module', + '<(webrtc_root)/modules/modules.gyp:audio_conference_mixer', + '<(webrtc_root)/modules/modules.gyp:audio_device', + '<(webrtc_root)/modules/modules.gyp:audio_processing', + '<(webrtc_root)/modules/modules.gyp:media_file', + '<(webrtc_root)/modules/modules.gyp:rtp_rtcp', + '<(webrtc_root)/modules/modules.gyp:udp_transport', + '<(webrtc_root)/modules/modules.gyp:webrtc_utility', + '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', + '<(webrtc_root)/../test/test.gyp:test_support_main', + '<(webrtc_root)/../testing/gtest.gyp:gtest', + ], + 'include_dirs': [ + '../../..', + '../interface', + ], + 'sources': [ + 'channel_unittest.cc', + ], + }, + ], # targets + }], # build_with_chromium + ], # conditions } # Local Variables: