Fix test broken by simulator triple changes.

This commit is contained in:
Adrian Prantl 2020-03-06 11:13:04 -08:00
parent 3b2c4e7178
commit 33b696b57a
2 changed files with 11 additions and 2 deletions

View File

@ -400,6 +400,15 @@ bool DynamicLoaderDarwin::JSONImageInformationIntoImageInfo(
else if (os_name == "maccatalyst") {
image_infos[i].os_type = llvm::Triple::IOS;
image_infos[i].os_env = llvm::Triple::MacABI;
} else if (os_name == "iossimulator") {
image_infos[i].os_type = llvm::Triple::IOS;
image_infos[i].os_env = llvm::Triple::Simulator;
} else if (os_name == "tvossimulator") {
image_infos[i].os_type = llvm::Triple::TvOS;
image_infos[i].os_env = llvm::Triple::Simulator;
} else if (os_name == "watchossimulator") {
image_infos[i].os_type = llvm::Triple::WatchOS;
image_infos[i].os_env = llvm::Triple::Simulator;
}
}
if (image->HasKey("min_version_os_sdk")) {

View File

@ -82,7 +82,7 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase):
self.assertIsNotNone(process_info)
# Check that ostype is correct
self.assertEquals(process_info['ostype'], platform)
self.assertEquals(process_info['ostype'], platform + 'simulator')
# Now for dylibs
dylib_info_raw = context.get("dylib_info_raw")
@ -97,7 +97,7 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase):
break
self.assertIsNotNone(image_info)
self.assertEquals(image['min_version_os_name'], platform)
self.assertEquals(image['min_version_os_name'], platform + 'simulator')
@apple_simulator_test('iphone')