Fix iOS test with libc++ exception throw change.

After https://reviews.llvm.org/D141222 exceptions call into
__libcpp_verbose_abort, which Chromium sets to `brk 0` in release.

Bug: 1425429
Change-Id: Ie00d1317bb03fcb1f15fb5c41ab69640dfb564b7
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4347775
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
This commit is contained in:
Justin Cohen 2023-03-16 23:10:08 -04:00 committed by Crashpad LUCI CQ
parent fdf7b9e8e9
commit c21292dd71
2 changed files with 11 additions and 1 deletions

View File

@ -66,7 +66,11 @@ source_set("google_test_setup") {
source_set("xcuitests") {
testonly = true
sources = [ "crash_type_xctest.mm" ]
configs += [ "../..:crashpad_config" ]
configs += [
"../..:crashpad_config",
"../../build:crashpad_is_in_chromium",
]
deps = [
"../../build:ios_enable_arc",
"../../build:ios_xctest",

View File

@ -150,10 +150,16 @@
- (void)testException {
[rootObject_ crashException];
// After https://reviews.llvm.org/D141222 exceptions call
// __libcpp_verbose_abort, which Chromium sets to `brk 0` in release.
#if defined(CRASHPAD_IS_IN_CHROMIUM) && defined(NDEBUG)
[self verifyCrashReportException:SIGABRT];
#else
[self verifyCrashReportException:EXC_SOFT_SIGNAL];
NSNumber* report_exception;
XCTAssertTrue([rootObject_ pendingReportExceptionInfo:&report_exception]);
XCTAssertEqual(report_exception.intValue, SIGABRT);
#endif
}
- (void)testNSException {