mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +08:00
ios: Fix test failure on M1 ARM64 machines.
in_process_intermediate_dump_handler_test was mixing CPU architecture (x86_64 vs arm64) and iOS device type (iphoneos vs iphonesimulator). Bug: 1306589 Change-Id: Ie43a7f1916d69888e992320d999010071b2575b3 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3527034 Reviewed-by: Rohit Rao <rohitrao@chromium.org> Commit-Queue: Justin Cohen <justincohen@chromium.org>
This commit is contained in:
parent
cd13ea34eb
commit
4c85c466b0
@ -104,12 +104,18 @@ TEST_F(InProcessIntermediateDumpHandlerTest, TestSystem) {
|
||||
EXPECT_STREQ(system->CPUVendor().c_str(), "GenuineIntel");
|
||||
#elif defined(ARCH_CPU_ARM64)
|
||||
EXPECT_EQ(system->GetCPUArchitecture(), kCPUArchitectureARM64);
|
||||
utsname uts;
|
||||
ASSERT_EQ(uname(&uts), 0);
|
||||
EXPECT_STREQ(system->MachineDescription().c_str(), uts.machine);
|
||||
#else
|
||||
#error Port to your CPU architecture
|
||||
#endif
|
||||
#if TARGET_OS_SIMULATOR
|
||||
EXPECT_EQ(system->MachineDescription().substr(0, 13),
|
||||
std::string("iOS Simulator"));
|
||||
#elif TARGET_OS_IPHONE
|
||||
utsname uts;
|
||||
ASSERT_EQ(uname(&uts), 0);
|
||||
EXPECT_STREQ(system->MachineDescription().c_str(), uts.machine);
|
||||
#endif
|
||||
|
||||
EXPECT_EQ(system->GetOperatingSystem(), SystemSnapshot::kOperatingSystemIOS);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user