Skip to content

Commit ce3091b

Browse files
committed
[Tests] Fix up lit.cfg after the cherry-picks.
1 parent 57d03df commit ce3091b

File tree

1 file changed

+33
-22
lines changed

1 file changed

+33
-22
lines changed

test/lit.cfg

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,28 +1143,27 @@ if os.path.exists(static_libswiftCore_path):
11431143
# Set up testing with the standard libraries coming from the OS / just-built libraries
11441144
# default Swift tests to use the just-built libraries
11451145
target_stdlib_path = platform_module_dir
1146-
if not kIsWindows:
1147-
if 'use_os_stdlib' not in lit_config.params:
1148-
lit_config.note('Testing with the just-built libraries at ' + target_stdlib_path)
1149-
config.target_run = (
1150-
"/usr/bin/env "
1151-
"DYLD_LIBRARY_PATH='{0}' " # Apple option
1152-
"LD_LIBRARY_PATH='{0}' " # Linux option
1153-
"SIMCTL_CHILD_DYLD_LIBRARY_PATH='{0}' " # Simulator option
1154-
.format(target_stdlib_path)) + config.target_run
1155-
else:
1156-
os_stdlib_path = ''
1157-
if run_vendor == 'apple':
1158-
#If we get swift-in-the-OS for non-Apple platforms, add a condition here
1159-
os_stdlib_path = "/usr/lib/swift"
1160-
all_stdlib_path = os.path.pathsep.join((os_stdlib_path, target_stdlib_path))
1161-
lit_config.note('Testing with the standard libraries coming from the OS ' + all_stdlib_path)
1162-
config.target_run = (
1163-
"/usr/bin/env "
1164-
"DYLD_LIBRARY_PATH='{0}' " # Apple option
1165-
"LD_LIBRARY_PATH='{0}' " # Linux option
1166-
"SIMCTL_CHILD_DYLD_LIBRARY_PATH='{0}' " # Simulator option
1167-
.format(all_stdlib_path)) + config.target_run
1146+
if 'use_os_stdlib' not in lit_config.params:
1147+
lit_config.note('Testing with the just-built libraries at ' + target_stdlib_path)
1148+
config.target_run = (
1149+
"/usr/bin/env "
1150+
"DYLD_LIBRARY_PATH='{0}' " # Apple option
1151+
"LD_LIBRARY_PATH='{0}' " # Linux option
1152+
"SIMCTL_CHILD_DYLD_LIBRARY_PATH='{0}' " # Simulator option
1153+
.format(target_stdlib_path)) + config.target_run
1154+
else:
1155+
os_stdlib_path = ''
1156+
if run_vendor == 'apple':
1157+
#If we get swift-in-the-OS for non-Apple platforms, add a condition here
1158+
os_stdlib_path = "/usr/lib/swift"
1159+
all_stdlib_path = os.path.pathsep.join((os_stdlib_path, target_stdlib_path))
1160+
lit_config.note('Testing with the standard libraries coming from the OS ' + all_stdlib_path)
1161+
config.target_run = (
1162+
"/usr/bin/env "
1163+
"DYLD_LIBRARY_PATH='{0}' " # Apple option
1164+
"LD_LIBRARY_PATH='{0}' " # Linux option
1165+
"SIMCTL_CHILD_DYLD_LIBRARY_PATH='{0}' " # Simulator option
1166+
.format(all_stdlib_path)) + config.target_run
11681167

11691168
if not getattr(config, 'target_run_simple_swift', None):
11701169
config.target_run_simple_swift_parameterized = \
@@ -1180,6 +1179,18 @@ if not getattr(config, 'target_run_simple_swift', None):
11801179
'%s %%t/a.out &&'
11811180
'%s %%t/a.out'
11821181
% (config.target_build_swift, mcp_opt, config.target_codesign, config.target_run))
1182+
config.target_run_simple_opt_O_swift = (
1183+
'%%empty-directory(%%t) && '
1184+
'%s %s -O %%s -o %%t/a.out -module-name main && '
1185+
'%s %%t/a.out &&'
1186+
'%s %%t/a.out'
1187+
% (config.target_build_swift, mcp_opt, config.target_codesign, config.target_run))
1188+
config.target_run_simple_opt_Osize_swift = (
1189+
'%%empty-directory(%%t) && '
1190+
'%s %s -Osize %%s -o %%t/a.out -module-name main && '
1191+
'%s %%t/a.out &&'
1192+
'%s %%t/a.out'
1193+
% (config.target_build_swift, mcp_opt, config.target_codesign, config.target_run))
11831194
config.target_run_stdlib_swift = (
11841195
'%%empty-directory(%%t) && '
11851196
'%s %s %%s -o %%t/a.out -module-name main '

0 commit comments

Comments
 (0)