@@ -60,24 +60,6 @@ def darwin_get_sdk_version(sdk_path):
60
60
"ProductBuildVersion" ]).rstrip ()
61
61
return (name , vers , build )
62
62
63
-
64
- def darwin_sdk_build_version_split (version ):
65
- m = re .search ("([0-9]+)([A-Z])([0-9]+)" , version )
66
- return (int (m .group (1 )), m .group (2 ), int (m .group (3 )))
67
-
68
-
69
- def darwin_sdk_build_version_cmp (lhs , rhs ):
70
- # The `_cmp` function is provided to port the Python 2 global `cmp`
71
- # function forward to Python 3. The function implementation is taken
72
- # directly from the recommendation that announced its removal.
73
- # See: https://docs.python.org/3.0/whatsnew/3.0.html#ordering-comparisons
74
- def _cmp (a , b ):
75
- return (a > b ) - (a < b )
76
- return _cmp (
77
- darwin_sdk_build_version_split (lhs ),
78
- darwin_sdk_build_version_split (rhs ))
79
-
80
-
81
63
# Run sw_vers on the target to be tested and return the results.
82
64
def darwin_get_sw_vers (commandPrefix = []):
83
65
name = lit .util .executeCommand (
@@ -98,19 +80,7 @@ def darwin_get_ios_sim_vers():
98
80
def get_simulator_command (run_os , run_cpu , sdk_path ):
99
81
(name , vers , build ) = darwin_get_sdk_version (sdk_path )
100
82
if run_os == 'ios' :
101
- # There are two binaries for the iOS simulator: 'sim' and 'simctl'.
102
- # 'sim' is only supported for iOS <= 8.1 and early versions of 8.2.
103
- # 'simctl' is supported for iOS >= 8.2.
104
- # 'simctl' used to have a bug where it failed to propagate the exit
105
- # code of the child process. This was fixed only in the middle of 8.2
106
- # development cycle.
107
- if ((darwin_sdk_build_version_cmp (build , "12E999" ) <= 0 ) or
108
- (darwin_sdk_build_version_cmp ("12F1" , build ) <= 0 and
109
- darwin_sdk_build_version_cmp (build , "12F12" ) <= 0 ) or
110
- (darwin_sdk_build_version_cmp ("12H1" , build ) <= 0 and
111
- darwin_sdk_build_version_cmp (build , "12H11" ) <= 0 )):
112
- return "sim"
113
- elif run_cpu == "i386" :
83
+ if run_cpu == "i386" :
114
84
if min (darwin_get_ios_sim_vers ()) > 10.3 :
115
85
print ("ERROR: Install iOS 10.3 or older simulator for 32bit testing" )
116
86
print ("INFO: Xcode -> Preferences -> Components -> Simulators" )
@@ -130,15 +100,6 @@ def get_lldb_python_path(lldb_build_root):
130
100
lldb_path = os .path .join (lldb_build_root , 'bin' , 'lldb' )
131
101
return subprocess .check_output ([lldb_path , "-P" ]).rstrip ()
132
102
133
- assert darwin_sdk_build_version_cmp ("11A1" , "12A1" ) < 0
134
- assert darwin_sdk_build_version_cmp ("12A1" , "11A1" ) > 0
135
-
136
- assert darwin_sdk_build_version_cmp ("11A1" , "11B1" ) < 0
137
- assert darwin_sdk_build_version_cmp ("11B1" , "11A1" ) > 0
138
-
139
- assert darwin_sdk_build_version_cmp ("11A22" , "11A100" ) < 0
140
- assert darwin_sdk_build_version_cmp ("11A100" , "11A22" ) > 0
141
-
142
103
###
143
104
144
105
# Check that the object root is known.
0 commit comments