Revert of Removing unused audio device tests (patchset #1 id:1 of https://codereview.webrtc.org/2716843002/ )

Reason for revert:
I unfortunately have to revert this since trybots are still trying to run these tests and now they fail because the tests aren't there :-/  Before relanding, can you work with engprod to make sure we don't run them?

Original issue's description:
> Removes a test suite that is no longer used or maintained.
>
> BUG=NONE
>
> Review-Url: https://codereview.webrtc.org/2716843002
> Cr-Commit-Position: refs/heads/master@{#16825}
> Committed: bb5136f940

TBR=solenberg@webrtc.org,nisse@webrtc.org,henrika@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=NONE

Review-Url: https://codereview.webrtc.org/2721433002
Cr-Commit-Position: refs/heads/master@{#16845}
This commit is contained in:
tommi 2017-02-26 07:12:50 -08:00 committed by Commit bot
parent da00077cfa
commit 3dda246b69
4 changed files with 1711 additions and 1 deletions

View File

@ -321,7 +321,10 @@ if (!build_with_chromium) {
deps += [ "modules/video_capture:video_capture_tests" ]
}
if (!is_ios) {
deps += [ "voice_engine:voe_auto_test" ]
deps += [
"modules/audio_device:audio_device_tests",
"voice_engine:voe_auto_test",
]
}
if (rtc_enable_protobuf) {
deps += [ "logging:rtc_event_log2rtp_dump" ]

View File

@ -317,6 +317,29 @@ if (rtc_include_tests) {
]
all_dependent_configs = [ ":mock_audio_device_config" ]
}
if (!is_ios) {
# These tests do not work on ios, see
# https://bugs.chromium.org/p/webrtc/issues/detail?id=4755
rtc_executable("audio_device_tests") {
testonly = true
sources = [
"test/audio_device_test_api.cc",
"test/audio_device_test_defines.h",
]
deps = [
":audio_device",
"../..:webrtc_common",
"../../system_wrappers",
"../../test:test_main",
"../../test:test_support",
"../rtp_rtcp",
"../utility",
"//testing/gtest",
]
public_configs = [ ":audio_device_config" ]
}
}
}
if (!build_with_chromium && is_android) {

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,75 @@
/*
* Copyright (c) 2012 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.
*/
#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_TEST_DEFINES_H
#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_TEST_DEFINES_H
#include "webrtc/common_types.h"
#include "webrtc/modules/audio_device/include/audio_device.h"
#include "webrtc/system_wrappers/include/trace.h"
#ifdef _WIN32
#define MACRO_DEFAULT_DEVICE AudioDeviceModule::kDefaultDevice
#define MACRO_DEFAULT_COMMUNICATION_DEVICE AudioDeviceModule::kDefaultCommunicationDevice
#else
#define MACRO_DEFAULT_DEVICE 0
#define MACRO_DEFAULT_COMMUNICATION_DEVICE 0
#endif
#ifdef ANDROID
#include <android/log.h>
#define LOG_TAG "WebRtc ADM TEST"
#define TEST_LOG(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
#define TEST_LOG_ERROR(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
#else
#define TEST_LOG printf
#define TEST_LOG_ERROR(...) fprintf(stderr, __VA_ARGS__)
#endif
static int warningCount = 0;
#define RESET_TEST \
do { \
warningCount = 0; \
} while(0) \
#define PRINT_ERR_MSG(msg) \
do { \
TEST_LOG_ERROR("Error at line %i of %s\n%s", \
__LINE__, __FILE__, msg); \
} while(0)
#define WARNING(expr) \
do { \
if (!(expr)) { \
TEST_LOG_ERROR("WARNING #%d: at line %i\n\n", \
warningCount+1, __LINE__); \
warningCount++; \
} \
} while(0)
#define PRINT_TEST_RESULTS \
do { \
if (warningCount > 0) \
{ \
TEST_LOG(">> %d warnings <<\n\n", \
warningCount); \
} \
} while(0)
// Helper functions
// For iPhone, they are defined in iPhone specific test code.
// For Android, they are defined in API test only (since both
// API and Func tests are built into the same lib).
// For other, they are defined in both API test and Func test.
const char* GetFilename(const char* filename);
const char* GetResource(const char* resource);
#endif // WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_TEST_DEFINES_H