diff options
author | Frederic Riss <friss@apple.com> | 2018-04-25 22:12:12 +0000 |
---|---|---|
committer | Frederic Riss <friss@apple.com> | 2018-04-25 22:12:12 +0000 |
commit | 05e8bc85e63cd2f6b0795e7d254611439f63a238 (patch) | |
tree | 4559893c648a0cde0dbc8e59e7231060c54e4e92 /lldb/packages/Python/lldbsuite/test/tools | |
parent | 516837f2a1585d4a2a620162cc996ca763046e7d (diff) | |
download | bcm5719-llvm-05e8bc85e63cd2f6b0795e7d254611439f63a238.tar.gz bcm5719-llvm-05e8bc85e63cd2f6b0795e7d254611439f63a238.zip |
[debugserver] Return 'ios' instead of 'iphoneos' for the ostype.
When I merged the 2 codepaths that return an OS type, I hade
checked that the places accepting 'iphoneos' would also accept
'ios', but then I got it backwards and return 'iphoneos'.
We use this value to build triples, and there 'iphoneos' is
invalid.
This also makes the test slightly simpler.
llvm-svn: 330877
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py index e5589ca4f0b..8c8fed8e44e 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py @@ -13,14 +13,14 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) - def check_simulator_ostype(self, sdk, platform_names, arch='x86_64'): + def check_simulator_ostype(self, sdk, platform, arch='x86_64'): sim_devices_str = subprocess.check_output(['xcrun', 'simctl', 'list', '-j', 'devices']) sim_devices = json.loads(sim_devices_str)['devices'] # Find an available simulator for the requested platform deviceUDID = None for (runtime,devices) in sim_devices.items(): - if not any(p in runtime.lower() for p in platform_names): + if not platform in runtime.lower(): continue for device in devices: if device['availability'] != '(available)': @@ -32,7 +32,7 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase): # Launch the process using simctl self.assertIsNotNone(deviceUDID) - exe_name = 'test_simulator_platform_{}'.format(platform_names[0]) + exe_name = 'test_simulator_platform_{}'.format(platform) sdkroot = subprocess.check_output(['xcrun', '--show-sdk-path', '--sdk', sdk]) self.build(dictionary={ 'EXE': exe_name, 'SDKROOT': sdkroot.strip(), @@ -75,7 +75,7 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase): self.assertIsNotNone(process_info) # Check that ostype is correct - self.assertTrue(process_info['ostype'] in platform_names) + self.assertEquals(process_info['ostype'], platform) # Now for dylibs dylib_info_raw = context.get("dylib_info_raw") @@ -90,23 +90,23 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase): break self.assertIsNotNone(image_info) - self.assertTrue(image['min_version_os_name'] in platform_names) + self.assertEquals(image['min_version_os_name'], platform) @apple_simulator_test('iphone') @debugserver_test def test_simulator_ostype_ios(self): self.check_simulator_ostype(sdk='iphonesimulator', - platform_names=['iphoneos', 'ios']) + platform='ios') @apple_simulator_test('appletv') @debugserver_test def test_simulator_ostype_tvos(self): self.check_simulator_ostype(sdk='appletvsimulator', - platform_names=['tvos']) + platform='tvos') @apple_simulator_test('watch') @debugserver_test def test_simulator_ostype_watchos(self): self.check_simulator_ostype(sdk='watchsimulator', - platform_names=['watchos'], arch='i386') + platform='watchos', arch='i386') |