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

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

Issue 2828793003: GN: Tighten up test target visibility + refactorings (Closed)
Patch Set: Move out fec_test_helper from rtc_include_tests Created 3 years, 8 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/remote_bitrate_estimator/BUILD.gn ('k') | webrtc/modules/utility/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/BUILD.gn
diff --git a/webrtc/modules/rtp_rtcp/BUILD.gn b/webrtc/modules/rtp_rtcp/BUILD.gn
index ec1766641ed9f94727870d720e378b27669b3f94..a369218a6884fadac4d33e70c9b6049c679aff19 100644
--- a/webrtc/modules/rtp_rtcp/BUILD.gn
+++ b/webrtc/modules/rtp_rtcp/BUILD.gn
@@ -192,6 +192,25 @@ rtc_static_library("rtp_rtcp") {
}
}
+rtc_source_set("fec_test_helper") {
+ testonly = true
+ sources = [
+ "source/fec_test_helper.cc",
+ "source/fec_test_helper.h",
+ ]
+ deps = [
+ ":rtp_rtcp",
+ "../../base:rtc_base_approved",
+ ]
+
+ # TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
+ configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
+ 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" ]
+ }
+}
+
if (rtc_include_tests) {
rtc_executable("test_packet_masks_metrics") {
testonly = true
@@ -210,6 +229,13 @@ if (rtc_include_tests) {
rtc_source_set("rtp_rtcp_modules_tests") {
testonly = true
+
+ # Skip restricting visibility on mobile platforms since the tests on those
+ # gets additional generated targets which would require many lines here to
+ # cover (which would be confusing to read and hard to maintain).
+ if (!is_android && !is_ios) {
+ visibility = [ "//webrtc/modules:modules_tests" ]
+ }
sources = [
"test/testFec/test_fec.cc",
]
@@ -224,13 +250,29 @@ if (rtc_include_tests) {
}
}
- rtc_source_set("rtp_rtcp_unittests") {
+ rtc_source_set("mock_rtp_rtcp") {
testonly = true
sources = [
"mocks/mock_rtp_rtcp.h",
+ ]
+ deps = [
+ ":rtp_rtcp",
+ "../../base:rtc_base_approved",
+ "../../test:test_support",
+ ]
+ }
+
+ rtc_source_set("rtp_rtcp_unittests") {
+ testonly = true
+
+ # Skip restricting visibility on mobile platforms since the tests on those
+ # gets additional generated targets which would require many lines here to
+ # cover (which would be confusing to read and hard to maintain).
+ if (!is_android && !is_ios) {
+ visibility = [ "//webrtc/modules:modules_unittests" ]
+ }
+ sources = [
"source/byte_io_unittest.cc",
- "source/fec_test_helper.cc",
- "source/fec_test_helper.h",
"source/flexfec_header_reader_writer_unittest.cc",
"source/flexfec_receiver_unittest.cc",
"source/flexfec_sender_unittest.cc",
@@ -291,6 +333,8 @@ if (rtc_include_tests) {
"test/testAPI/test_api_video.cc",
]
deps = [
+ ":fec_test_helper",
+ ":mock_rtp_rtcp",
":rtp_rtcp",
"../..:webrtc_common",
"../../api:transport_api",
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/BUILD.gn ('k') | webrtc/modules/utility/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698