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