Skip to content

Commit 961764a

Browse files
authored
Merge pull request swiftlang#31909 from gribozavr/simplify-lit-cfg
Removed support for iOS 8.2 and earlier from lit.cfg
2 parents 6d3a3db + 131e1d3 commit 961764a

File tree

1 file changed

+1
-40
lines changed

1 file changed

+1
-40
lines changed

test/lit.cfg

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -60,24 +60,6 @@ def darwin_get_sdk_version(sdk_path):
6060
"ProductBuildVersion"]).rstrip()
6161
return (name, vers, build)
6262

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-
8163
# Run sw_vers on the target to be tested and return the results.
8264
def darwin_get_sw_vers(commandPrefix=[]):
8365
name = lit.util.executeCommand(
@@ -98,19 +80,7 @@ def darwin_get_ios_sim_vers():
9880
def get_simulator_command(run_os, run_cpu, sdk_path):
9981
(name, vers, build) = darwin_get_sdk_version(sdk_path)
10082
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":
11484
if min(darwin_get_ios_sim_vers()) > 10.3:
11585
print("ERROR: Install iOS 10.3 or older simulator for 32bit testing")
11686
print("INFO: Xcode -> Preferences -> Components -> Simulators")
@@ -130,15 +100,6 @@ def get_lldb_python_path(lldb_build_root):
130100
lldb_path = os.path.join(lldb_build_root, 'bin', 'lldb')
131101
return subprocess.check_output([lldb_path, "-P"]).rstrip()
132102

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-
142103
###
143104

144105
# Check that the object root is known.

0 commit comments

Comments
 (0)