Skip to content

Commit 0573f1e

Browse files
committed
[Test] Add back-deployed concurrency library path for runtime OS testing
When testing the runtime in the OS (via the lit parameter `use_os_stdlib`), add the path to the back-deployed concurrency libraries into `DYLD_LIBRARY_PATH` for the test run. This should allow us to run our regression tests on older OS's.
1 parent 75a5831 commit 0573f1e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/lit.cfg

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ config.swift_test_options = '-swift-version ' + swift_version
408408

409409
# Define a macro for the next release OS version.
410410
# This macro can be used in code as `@available(SwiftStdlib 5.5, *)`.
411-
if 'back_deploy_concurrency' in lit_config.params:
411+
if 'back_deploy_concurrency' in config.available_features:
412412
swift_stdlib_macro = '\'SwiftStdlib 5.5:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0\''
413413
else:
414414
swift_stdlib_macro = '\'SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0\''
@@ -1913,12 +1913,17 @@ if not kIsWindows:
19131913
else:
19141914
config.available_features.add('use_os_stdlib')
19151915
os_stdlib_path = ''
1916+
concurrency_back_deploy_path = ''
19161917
if run_vendor == 'apple':
19171918
#If we get swift-in-the-OS for non-Apple platforms, add a condition here
19181919
os_stdlib_path = "/usr/lib/swift"
19191920
if run_os == 'maccatalyst':
19201921
os_stdlib_path = "/System/iOSSupport/usr/lib/swift:/usr/lib/swift"
1921-
all_stdlib_path = os.path.pathsep.join((os_stdlib_path, target_stdlib_path))
1922+
if 'back_deploy_concurrency' in config.available_features:
1923+
concurrency_back_deploy_path = os.path.join(os.path.dirname(swift_obj_root), os.path.basename(swift_obj_root).replace("swift-", "backdeployconcurrency-"), 'lib', 'swift-5.5', run_os)
1924+
1925+
all_stdlib_path = os.path.pathsep.join((os_stdlib_path, concurrency_back_deploy_path, target_stdlib_path))
1926+
19221927
lit_config.note('Testing with the standard libraries coming from the OS ' + all_stdlib_path)
19231928
config.target_run = (
19241929
"/usr/bin/env "

0 commit comments

Comments
 (0)