Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
After upgrading to xcode 12, some Gtest tests have started to randomly fail. The solution around this problem is to build and run GTests as XCTests. In order to achieve that, the CL sets enable_run_ios_unittests_with_xctest to true in all iOS builds and adds a dependency on //base/test:google_test_runner for each Gtest that needs to run as an XCTest. Real XCTest don't need the dependency and they are marked with the rtc_test() argument `is_xctest=true` (apprtcmobile_tests, sdk_unittests and sdk_framework_unittests). This CL is based on [1] which passes --xctest to the runner and uses --undefok to avoid to crash when absl/flags doesn't recognize the flag --enable-run-ios-unittests-with-xctest (absl/flags cannot have "-" in flags so WebRTC binaries cannot define that flag). To workaround the issue, WebRTC tests always behave like --enable-run-ios-unittests-with-xctest is always set (by linking only with //base/test:google_test_runner to run iOS tests). This fixes iOS12 and iOS13 tests but not iOS14 on which some tests are failing because of restricted access to resources (this will be addressed in another CL). Long term, this solution might cause problems when Chromium decides to update test() GN template and/or the test launcher, so WebRTC should plan a better integration with Chromium's iOS infra. [1] - https://chromium-review.googlesource.com/c/chromium/tools/build/+/2550656 Bug: webrtc:12134 Change-Id: I24c731dee0310e02ae1bbe6c23d359d6fcd18f17 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/193620 Reviewed-by: Jeremy Leconte <[email protected]> Commit-Queue: Mirko Bonadei <[email protected]> Cr-Commit-Position: refs/heads/master@{#32716}
- Loading branch information