Skip to content

Commit

Permalink
Revert "Switch from "rtc_ios_xctest_test" to "test"."
Browse files Browse the repository at this point in the history
This reverts commit 7a73c77.

Reason for revert: Breaks downstream test.

Original change's description:
> Switch from "rtc_ios_xctest_test" to "test".
> 
> Using the "test" GN template instead of the "ios_xctest_test" one we
> will get iOS support for isolates via MB and GN for free, making it
> easier to migrate the iOS recipe and fix bugs.webrtc.org/11604.
> 
> Bug: webrtc:11881
> Change-Id: I72b90f8494c473fa567e6296caf7a771e4caba92
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182680
> Reviewed-by: Dirk Pranke <[email protected]>
> Commit-Queue: Mirko Bonadei <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#32064}

[email protected],[email protected],[email protected]

Change-Id: Ia4d6257fee42661c10303217980bd0a9126d2709
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11881
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183765
Reviewed-by: Mirko Bonadei <[email protected]>
Commit-Queue: Mirko Bonadei <[email protected]>
Cr-Commit-Position: refs/heads/master@{#32068}
  • Loading branch information
MirkoBonadei authored and Commit Bot committed Sep 10, 2020
1 parent 822283d commit fb39998
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 25 deletions.
2 changes: 1 addition & 1 deletion examples/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) {
]
}

test("apprtcmobile_tests") {
rtc_ios_xctest_test("apprtcmobile_tests") {
info_plist = "objc/AppRTCMobile/ios/Info.plist"
sources = [ "objc/AppRTCMobile/tests/main.mm" ]
deps = [
Expand Down
7 changes: 2 additions & 5 deletions sdk/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.

import("//testing/test.gni")
import("../webrtc.gni")

if (is_ios) {
import("//build/config/ios/ios_sdk.gni")
import("//build/config/ios/rules.gni")
Expand Down Expand Up @@ -1167,7 +1165,7 @@ if (is_ios || is_mac) {
}

# These tests use static linking.
test("sdk_unittests") {
rtc_ios_xctest_test("sdk_unittests") {
info_plist = "//test/ios/Info.plist"
sources = [ "objc/unittests/main.mm" ]

Expand All @@ -1183,9 +1181,8 @@ if (is_ios || is_mac) {
}

# These tests link to the framework.
test("sdk_framework_unittests") {
rtc_ios_xctest_test("sdk_framework_unittests") {
info_plist = "//test/ios/Info.plist"
cflags_objc = [ "-Wno-objc-property-no-attribute" ]
sources = [
"objc/unittests/RTCDoNotPutCPlusPlusInFrameworkHeaders_xctest.m",
"objc/unittests/main.mm",
Expand Down
6 changes: 3 additions & 3 deletions tools_webrtc/mb/gn_isolate_map.pyl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"apprtcmobile_tests": {
"label": "//examples:apprtcmobile_tests",
"type": "console_test_launcher",
"type": "raw",
},
"audio_decoder_unittests": {
"label": "//modules/audio_coding:audio_decoder_unittests",
Expand Down Expand Up @@ -108,11 +108,11 @@
},
"sdk_framework_unittests": {
"label": "//sdk:sdk_framework_unittests",
"type": "console_test_launcher",
"type": "raw",
},
"sdk_unittests": {
"label": "//sdk:sdk_unittests",
"type": "console_test_launcher",
"type": "raw",
},
"slow_tests": {
"label": "//:slow_tests",
Expand Down
24 changes: 8 additions & 16 deletions tools_webrtc/mb/mb_config.pyl
Original file line number Diff line number Diff line change
Expand Up @@ -392,35 +392,31 @@

# iOS
'ios_debug_bot_arm': [
'ios', 'debug_bot', 'arm', 'no_ios_code_signing', 'ios_use_goma_rbe',
'xctest',
'ios', 'debug_bot', 'arm', 'no_ios_code_signing', 'ios_use_goma_rbe'
],
'ios_release_bot_arm': [
'ios', 'release_bot', 'arm', 'no_ios_code_signing', 'ios_use_goma_rbe',
'xctest',
'ios', 'release_bot', 'arm', 'no_ios_code_signing', 'ios_use_goma_rbe'
],
'ios_debug_bot_arm64': [
'ios', 'debug_bot', 'arm64', 'no_ios_code_signing', 'ios_use_goma_rbe',
'xctest',
'ios', 'debug_bot', 'arm64', 'no_ios_code_signing', 'ios_use_goma_rbe'
],
'ios_release_bot_arm64': [
'ios', 'release_bot', 'arm64', 'no_ios_code_signing', 'ios_use_goma_rbe',
'xctest',
'ios', 'release_bot', 'arm64', 'no_ios_code_signing', 'ios_use_goma_rbe'
],
'ios_internal_debug_bot_arm64': [
'ios', 'debug_bot', 'arm64', 'ios_use_goma_rbe',
'ios_code_signing_identity_description', 'xctest',
'ios_code_signing_identity_description',
],
'ios_internal_release_bot_arm64': [
'ios', 'release_bot', 'arm64', 'ios_use_goma_rbe',
'ios_code_signing_identity_description', 'xctest',
'ios_code_signing_identity_description',
],
'ios_internal_pure_release_bot_arm64': [
'ios', 'pure_release_bot', 'arm64', 'ios_use_goma_rbe',
'ios_code_signing_identity_description', 'xctest',
'ios_code_signing_identity_description',
],
'ios_debug_bot_x64': [
'ios', 'debug_bot', 'x64', 'ios_use_goma_rbe', 'xctest',
'ios', 'debug_bot', 'x64', 'ios_use_goma_rbe'
],

# More configs
Expand Down Expand Up @@ -636,9 +632,5 @@
'win_undef_unicode': {
'gn_args': 'rtc_win_undef_unicode=true',
},

'xctest': {
'gn_args': 'enable_run_ios_unittests_with_xctest=true',
},
},
}
29 changes: 29 additions & 0 deletions webrtc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,35 @@ template("rtc_shared_library") {
}

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
# projects. See "mac_framework_bundle_with_umbrella_header".
template("ios_framework_bundle_with_umbrella_header") {
Expand Down

0 comments on commit fb39998

Please sign in to comment.