|
12 | 12 | #
|
13 | 13 | # This is a configuration file for the 'lit' test runner.
|
14 | 14 | #
|
15 |
| -# Refer to docs/Testing.rst for documentation. |
| 15 | +# Refer to docs/Testing.md for documentation. |
16 | 16 | #
|
17 |
| -# Update docs/Testing.rst when changing this file. |
| 17 | +# Update docs/Testing.md when changing this file. |
18 | 18 | #
|
19 | 19 | # -----------------------------------------------------------------------------
|
20 | 20 |
|
@@ -925,6 +925,15 @@ if (not getattr(config, 'target_run', None) and
|
925 | 925 | remote_run_host = lit_config.params['remote_run_host']
|
926 | 926 | remote_tmp_dir = lit_config.params['remote_run_tmpdir']
|
927 | 927 | remote_lib_dir = os.path.join(remote_tmp_dir, 'stdlib')
|
| 928 | + remote_run_lib_path = '' |
| 929 | + if 'use_os_stdlib' not in lit_config.params: |
| 930 | + remote_run_lib_path = remote_lib_dir |
| 931 | + else: |
| 932 | + os_stdlib_path = '' |
| 933 | + if run_vendor == 'apple': |
| 934 | + #If we get swift-in-the-OS for non-Apple platforms, add a condition here |
| 935 | + os_stdlib_path = "/usr/lib/swift" |
| 936 | + remote_run_lib_path = os.path.pathsep.join((os_stdlib_path, remote_lib_dir)) |
928 | 937 |
|
929 | 938 | remote_run_extra_args_param = lit_config.params.get('remote_run_extra_args')
|
930 | 939 | remote_run_extra_args = shlex.split(remote_run_extra_args_param or '')
|
@@ -973,7 +982,7 @@ if (not getattr(config, 'target_run', None) and
|
973 | 982 | "REMOTE_RUN_CHILD_DYLD_LIBRARY_PATH='{0}' " # Apple option
|
974 | 983 | "REMOTE_RUN_CHILD_LD_LIBRARY_PATH='{0}' " # Linux option
|
975 | 984 | "'{1}'/remote-run --input-prefix '{2}' --output-prefix %t "
|
976 |
| - "--remote-dir '{3}'%t {4} {5}".format(remote_lib_dir, |
| 985 | + "--remote-dir '{3}'%t {4} {5}".format(remote_run_lib_path, |
977 | 986 | config.swift_utils,
|
978 | 987 | config.swift_src_root,
|
979 | 988 | remote_tmp_dir,
|
@@ -1283,6 +1292,29 @@ if os.path.exists(libswiftCore_path):
|
1283 | 1292 | config.substitutions.append(('%target-static-stdlib-path', static_stdlib_path))
|
1284 | 1293 | lit_config.note('using static stdlib path: %s' % static_stdlib_path)
|
1285 | 1294 |
|
| 1295 | +# Set up testing with the standard libraries coming from the OS / just-built libraries |
| 1296 | +# default Swift tests to use the just-built libraries |
| 1297 | +target_stdlib_path = platform_module_dir |
| 1298 | +if 'use_os_stdlib' not in lit_config.params: |
| 1299 | + lit_config.note('Testing with the just-built libraries at ' + target_stdlib_path) |
| 1300 | + config.target_run = ( |
| 1301 | + "/usr/bin/env " |
| 1302 | + "DYLD_LIBRARY_PATH='{0}' " # Apple option |
| 1303 | + "LD_LIBRARY_PATH='{0}' " # Linux option |
| 1304 | + .format(target_stdlib_path)) |
| 1305 | +else: |
| 1306 | + os_stdlib_path = '' |
| 1307 | + if run_vendor == 'apple': |
| 1308 | + #If we get swift-in-the-OS for non-Apple platforms, add a condition here |
| 1309 | + os_stdlib_path = "/usr/lib/swift" |
| 1310 | + all_stdlib_path = os.path.pathsep.join((os_stdlib_path, target_stdlib_path)) |
| 1311 | + lit_config.note('Testing with the standard libraries coming from the OS ' + all_stdlib_path) |
| 1312 | + config.target_run = ( |
| 1313 | + "/usr/bin/env " |
| 1314 | + "DYLD_LIBRARY_PATH='{0}' " # Apple option |
| 1315 | + "LD_LIBRARY_PATH='{0}' " # Linux option |
| 1316 | + .format(all_stdlib_path)) |
| 1317 | + |
1286 | 1318 | if config.lldb_build_root != "":
|
1287 | 1319 | config.available_features.add('lldb')
|
1288 | 1320 | # Note: using the same approach to locating the lib dir as in
|
|
0 commit comments