| Index: webrtc/modules/audio_device/BUILD.gn
|
| diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn
|
| index ab9406e13fb0b0078b74fb837ebfe04cb5a0b2f4..e2b510cd7203f1df956f2d9a81d06fef30361014 100644
|
| --- a/webrtc/modules/audio_device/BUILD.gn
|
| +++ b/webrtc/modules/audio_device/BUILD.gn
|
| @@ -265,40 +265,84 @@ config("mock_audio_device_config") {
|
| }
|
|
|
| if (rtc_include_tests) {
|
| - rtc_source_set("mock_audio_device") {
|
| + rtc_source_set("audio_device_unittests") {
|
| testonly = true
|
| sources = [
|
| - "include/mock_audio_device.h",
|
| - "include/mock_audio_transport.h",
|
| + "fine_audio_buffer_unittest.cc",
|
| ]
|
| deps = [
|
| ":audio_device",
|
| + ":mock_audio_device",
|
| + "../../base:rtc_base_approved",
|
| + "../../system_wrappers:system_wrappers",
|
| "../../test:test_support",
|
| + "../utility:utility",
|
| + "//testing/gmock",
|
| ]
|
| - all_dependent_configs = [ ":mock_audio_device_config" ]
|
| + if (is_android) {
|
| + # Need to disable error due to the line in
|
| + # base/android/jni_android.h triggering it:
|
| + # const BASE_EXPORT jobject GetApplicationContext()
|
| + # error: type qualifiers ignored on function return type
|
| + cflags = [ "-Wno-ignored-qualifiers" ]
|
| + sources += [
|
| + "android/audio_device_unittest.cc",
|
| + "android/audio_manager_unittest.cc",
|
| + "android/ensure_initialized.cc",
|
| + "android/ensure_initialized.h",
|
| + ]
|
| + deps += [
|
| + "../../../base",
|
| + "//webrtc/sdk/android:libjingle_peerconnection_java",
|
| + ]
|
| + }
|
| + if (is_ios) {
|
| + sources += [ "ios/objc/RTCAudioSessionTest.mm" ]
|
| + configs += [ "//build/config/compiler:enable_arc" ]
|
| + if (target_cpu != "x64") {
|
| + sources += [ "ios/audio_device_unittest_ios.cc" ]
|
| + }
|
| + }
|
| + if (!build_with_chromium && is_clang) {
|
| + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
| + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
| + }
|
| }
|
| -}
|
|
|
| -# These tests do not work on ios, see
|
| -# https://bugs.chromium.org/p/webrtc/issues/detail?id=4755
|
| -if (rtc_include_tests && !is_ios) {
|
| - rtc_executable("audio_device_tests") {
|
| + rtc_source_set("mock_audio_device") {
|
| testonly = true
|
| sources = [
|
| - "test/audio_device_test_api.cc",
|
| - "test/audio_device_test_defines.h",
|
| + "include/mock_audio_device.h",
|
| + "include/mock_audio_transport.h",
|
| ]
|
| deps = [
|
| ":audio_device",
|
| - "../..:webrtc_common",
|
| - "../../system_wrappers",
|
| - "../../test:test_main",
|
| "../../test:test_support",
|
| - "../rtp_rtcp",
|
| - "../utility",
|
| - "//testing/gtest",
|
| ]
|
| - public_configs = [ ":audio_device_config" ]
|
| + 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" ]
|
| + }
|
| }
|
| }
|
|
|
|
|