[Lldb-commits] [lldb] 977f001 - [lldb/test] Fix TestAppleSimulatorOSType when multiple runtimes are installed
Fred Riss via lldb-commits
lldb-commits at lists.llvm.org
Fri May 29 08:30:57 PDT 2020
Author: Fred Riss
Date: 2020-05-29T08:30:04-07:00
New Revision: 977f00123a6d94c634d22356cae1da2a22f0e3df
URL: https://github.com/llvm/llvm-project/commit/977f00123a6d94c634d22356cae1da2a22f0e3df
DIFF: https://github.com/llvm/llvm-project/commit/977f00123a6d94c634d22356cae1da2a22f0e3df.diff
LOG: [lldb/test] Fix TestAppleSimulatorOSType when multiple runtimes are installed
One can have multiple simulator runtimes installed, supporting
various generations of OSs. The logic in TestAppleSimulatorOSType
might select a rnutime older than the one targeted by the current
tools, preventing the executable from running. This commit changes
the test to look for the most recent runtime available instead.
Added:
Modified:
lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py
Removed:
################################################################################
diff --git a/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py b/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py
index 86b54dd3e8e5..a259ef66832b 100644
--- a/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py
+++ b/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py
@@ -18,6 +18,7 @@ def check_simulator_ostype(self, sdk, platform, arch='x86_64'):
sim_devices = json.loads(sim_devices_str)['devices']
# Find an available simulator for the requested platform
deviceUDID = None
+ deviceRuntime = None
for simulator in sim_devices:
if isinstance(simulator,dict):
runtime = simulator['name']
@@ -32,9 +33,11 @@ def check_simulator_ostype(self, sdk, platform, arch='x86_64'):
continue
if 'isAvailable' in device and device['isAvailable'] != True:
continue
+ if deviceRuntime and runtime < deviceRuntime:
+ continue
deviceUDID = device['udid']
- break
- if deviceUDID != None:
+ deviceRuntime = runtime
+ # Stop searching in this runtime
break
# Launch the process using simctl
More information about the lldb-commits
mailing list