Skip to content

Commit

Permalink
Merge pull request #489 from apple/ewilde/5.10-guard-parse-version
Browse files Browse the repository at this point in the history
[5.10] Guard `parse_version`
  • Loading branch information
shahmishal authored May 25, 2024
2 parents 4e7153c + 65e6ecd commit 850c973
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Tests/Functional/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,14 @@ config.substitutions.append(('%{xctest_checker}', '%%{python} %s' % xctest_check
config.substitutions.append( ('%{python}', pipes.quote(sys.executable)) )

# Conditionally report the Swift 5.5 Concurrency runtime as available depending on the OS and version.
# Darwin is the only platform where this is a limitation.
(run_os, run_vers) = config.os_info
os_is_not_macOS = run_os != 'Darwin'
macOS_version_is_recent_enough = parse_version(run_vers) >= parse_version('12.0')
if os_is_not_macOS or macOS_version_is_recent_enough:
if run_os == 'Darwin':
assert run_vers != "", "No runtime version set."
if parse_version(run_vers) >= parse_version('12.0'):
config.available_features.add('concurrency_runtime')
else:
# Non-Darwin platforms have a concurrency runtime
config.available_features.add('concurrency_runtime')
if run_os == 'Windows':
config.available_features.add('OS=windows')

0 comments on commit 850c973

Please sign in to comment.