GN: Tighten up test target visibility + refactorings

Make all rtc_source_test target that contains tests that
are included in a test executable only be visible to the
rtc_test target. Doing this exposed a couple of errors and
dependency problems that were resolved. Having this could
have prevented duplicated execution of tests like the case that
was recently fixed by deadbeef@ in
https://codereview.webrtc.org/2820263004

New targets:
* //webrtc/modules/rtp_rtcp:fec_test_helper
* //webrtc/modules/rtp_rtcp:mock_rtp_rtcp
* //webrtc/modules/remote_bitrate_estimator:mock_remote_bitrate_observer

The mock files and targets should probably be moved into webrtc/test in
the future, but that's out of the scope of this CL.

BUG=webrtc:5716
NOTRY=True

Review-Url: https://codereview.webrtc.org/2828793003
Cr-Commit-Position: refs/heads/master@{#17863}
This commit is contained in:
kjellander
2017-04-25 04:04:50 -07:00
committed by Commit bot
parent b8a654c218
commit e0629c045e
26 changed files with 319 additions and 19 deletions

View File

@ -1168,6 +1168,13 @@ if (rtc_include_tests) {
rtc_source_set("audio_coding_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/APITest.cc",
"test/Channel.cc",
@ -1212,6 +1219,13 @@ if (rtc_include_tests) {
rtc_source_set("audio_coding_perf_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:webrtc_perf_tests" ]
}
sources = [
"codecs/opus/opus_complexity_unittest.cc",
"neteq/test/neteq_performance_unittest.cc",
@ -2015,6 +2029,12 @@ if (rtc_include_tests) {
rtc_source_set("audio_coding_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 = [
"acm2/acm_receiver_unittest.cc",
"acm2/audio_coding_module_unittest.cc",