Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: webrtc/modules/audio_device/BUILD.gn

Issue 2629923002: GN: Refactor modules_unittests to eliminate package boundary violations. (Closed)
Patch Set: Addressing comments. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/audio_conference_mixer/BUILD.gn ('k') | webrtc/modules/audio_mixer/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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" ]
+ }
}
}
« no previous file with comments | « webrtc/modules/audio_conference_mixer/BUILD.gn ('k') | webrtc/modules/audio_mixer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698