|
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 |
|
@@ -1093,6 +1093,15 @@ if (not getattr(config, 'target_run', None) and
|
1093 | 1093 | remote_run_host = lit_config.params['remote_run_host']
|
1094 | 1094 | remote_tmp_dir = lit_config.params['remote_run_tmpdir']
|
1095 | 1095 | remote_lib_dir = os.path.join(remote_tmp_dir, 'stdlib')
|
| 1096 | + remote_run_lib_path = '' |
| 1097 | + if 'use_os_stdlib' not in lit_config.params: |
| 1098 | + remote_run_lib_path = remote_lib_dir |
| 1099 | + else: |
| 1100 | + os_stdlib_path = '' |
| 1101 | + if run_vendor == 'apple': |
| 1102 | + #If we get swift-in-the-OS for non-Apple platforms, add a condition here |
| 1103 | + os_stdlib_path = "/usr/lib/swift" |
| 1104 | + remote_run_lib_path = os.path.pathsep.join((os_stdlib_path, remote_lib_dir)) |
1096 | 1105 |
|
1097 | 1106 | remote_run_extra_args_param = lit_config.params.get('remote_run_extra_args')
|
1098 | 1107 | remote_run_extra_args = shlex.split(remote_run_extra_args_param or '')
|
@@ -1141,7 +1150,7 @@ if (not getattr(config, 'target_run', None) and
|
1141 | 1150 | "REMOTE_RUN_CHILD_DYLD_LIBRARY_PATH='{0}' " # Apple option
|
1142 | 1151 | "REMOTE_RUN_CHILD_LD_LIBRARY_PATH='{0}' " # Linux option
|
1143 | 1152 | "'{1}'/remote-run --input-prefix '{2}' --output-prefix %t "
|
1144 |
| - "--remote-dir '{3}'%t {4} {5}".format(remote_lib_dir, |
| 1153 | + "--remote-dir '{3}'%t {4} {5}".format(remote_run_lib_path, |
1145 | 1154 | config.swift_utils,
|
1146 | 1155 | config.swift_src_root,
|
1147 | 1156 | remote_tmp_dir,
|
@@ -1461,6 +1470,29 @@ if os.path.exists(libswiftCore_path):
|
1461 | 1470 | config.substitutions.append(('%target-static-stdlib-path', static_stdlib_path))
|
1462 | 1471 | lit_config.note('using static stdlib path: %s' % static_stdlib_path)
|
1463 | 1472 |
|
| 1473 | +# Set up testing with the standard libraries coming from the OS / just-built libraries |
| 1474 | +# default Swift tests to use the just-built libraries |
| 1475 | +target_stdlib_path = platform_module_dir |
| 1476 | +if 'use_os_stdlib' not in lit_config.params: |
| 1477 | + lit_config.note('Testing with the just-built libraries at ' + target_stdlib_path) |
| 1478 | + config.target_run = ( |
| 1479 | + "/usr/bin/env " |
| 1480 | + "DYLD_LIBRARY_PATH='{0}' " # Apple option |
| 1481 | + "LD_LIBRARY_PATH='{0}' " # Linux option |
| 1482 | + .format(target_stdlib_path)) |
| 1483 | +else: |
| 1484 | + os_stdlib_path = '' |
| 1485 | + if run_vendor == 'apple': |
| 1486 | + #If we get swift-in-the-OS for non-Apple platforms, add a condition here |
| 1487 | + os_stdlib_path = "/usr/lib/swift" |
| 1488 | + all_stdlib_path = os.path.pathsep.join((os_stdlib_path, target_stdlib_path)) |
| 1489 | + lit_config.note('Testing with the standard libraries coming from the OS ' + all_stdlib_path) |
| 1490 | + config.target_run = ( |
| 1491 | + "/usr/bin/env " |
| 1492 | + "DYLD_LIBRARY_PATH='{0}' " # Apple option |
| 1493 | + "LD_LIBRARY_PATH='{0}' " # Linux option |
| 1494 | + .format(all_stdlib_path)) |
| 1495 | + |
1464 | 1496 | if config.lldb_build_root != "":
|
1465 | 1497 | config.available_features.add('lldb')
|
1466 | 1498 | # Note: using the same approach to locating the lib dir as in
|
|
0 commit comments