Reland "Switch from rtc_ios_xctest_test to rtc_test".
This is a reland of https://webrtc-review.googlesource.com/c/src/+/182680, and it is based on https://chromium-review.googlesource.com/c/chromium/src/+/2414169 which allows to force a "test" to be executed as an XCtest on a build target basis instead of on a GN args basis like it was happening in https://webrtc-review.googlesource.com/c/src/+/182680 because that was causing issues when launching tests on real devices. Bug: webrtc:11881, webrtc:11937 Change-Id: I4bec7f471cd0f878b6050f266cd0cca3b518d415 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184360 Reviewed-by: Dirk Pranke <dpranke@google.com> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32126}
This commit is contained in:
parent
4f55233cf7
commit
aef8a21a69
@ -632,7 +632,8 @@ if (is_ios || (is_mac && target_cpu != "x86")) {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
rtc_ios_xctest_test("apprtcmobile_tests") {
|
rtc_test("apprtcmobile_tests") {
|
||||||
|
is_xctest = true
|
||||||
info_plist = "objc/AppRTCMobile/ios/Info.plist"
|
info_plist = "objc/AppRTCMobile/ios/Info.plist"
|
||||||
sources = [ "objc/AppRTCMobile/tests/main.mm" ]
|
sources = [ "objc/AppRTCMobile/tests/main.mm" ]
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
@ -1165,7 +1165,8 @@ if (is_ios || is_mac) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# These tests use static linking.
|
# These tests use static linking.
|
||||||
rtc_ios_xctest_test("sdk_unittests") {
|
rtc_test("sdk_unittests") {
|
||||||
|
is_xctest = true
|
||||||
info_plist = "//test/ios/Info.plist"
|
info_plist = "//test/ios/Info.plist"
|
||||||
sources = [ "objc/unittests/main.mm" ]
|
sources = [ "objc/unittests/main.mm" ]
|
||||||
|
|
||||||
@ -1181,7 +1182,8 @@ if (is_ios || is_mac) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# These tests link to the framework.
|
# These tests link to the framework.
|
||||||
rtc_ios_xctest_test("sdk_framework_unittests") {
|
rtc_test("sdk_framework_unittests") {
|
||||||
|
is_xctest = true
|
||||||
info_plist = "//test/ios/Info.plist"
|
info_plist = "//test/ios/Info.plist"
|
||||||
sources = [
|
sources = [
|
||||||
"objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
|
"objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
|
||||||
@ -1669,8 +1671,8 @@ if (is_ios || is_mac) {
|
|||||||
|
|
||||||
rtc_library("video_toolbox_cc") {
|
rtc_library("video_toolbox_cc") {
|
||||||
visibility = [
|
visibility = [
|
||||||
":videotoolbox_objc",
|
|
||||||
":sdk_unittests_sources",
|
":sdk_unittests_sources",
|
||||||
|
":videotoolbox_objc",
|
||||||
]
|
]
|
||||||
sources = [
|
sources = [
|
||||||
"objc/components/video_codec/helpers.cc",
|
"objc/components/video_codec/helpers.cc",
|
||||||
|
|||||||
29
webrtc.gni
29
webrtc.gni
@ -878,35 +878,6 @@ template("rtc_shared_library") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_ios) {
|
if (is_ios) {
|
||||||
set_defaults("rtc_ios_xctest_test") {
|
|
||||||
configs = rtc_add_configs
|
|
||||||
suppressed_configs = []
|
|
||||||
}
|
|
||||||
|
|
||||||
template("rtc_ios_xctest_test") {
|
|
||||||
ios_xctest_test(target_name) {
|
|
||||||
forward_variables_from(invoker,
|
|
||||||
"*",
|
|
||||||
[
|
|
||||||
"configs",
|
|
||||||
"public_configs",
|
|
||||||
"suppressed_configs",
|
|
||||||
"visibility",
|
|
||||||
])
|
|
||||||
forward_variables_from(invoker, [ "visibility" ])
|
|
||||||
if (!defined(visibility)) {
|
|
||||||
visibility = webrtc_default_visibility
|
|
||||||
}
|
|
||||||
configs += invoker.configs
|
|
||||||
configs -= rtc_remove_configs
|
|
||||||
configs -= invoker.suppressed_configs
|
|
||||||
public_configs = [ rtc_common_inherited_config ]
|
|
||||||
if (defined(invoker.public_configs)) {
|
|
||||||
public_configs += invoker.public_configs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# TODO: Generate module.modulemap file to enable use in Swift
|
# TODO: Generate module.modulemap file to enable use in Swift
|
||||||
# projects. See "mac_framework_bundle_with_umbrella_header".
|
# projects. See "mac_framework_bundle_with_umbrella_header".
|
||||||
template("ios_framework_bundle_with_umbrella_header") {
|
template("ios_framework_bundle_with_umbrella_header") {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user