Skip to content

Commit 41cbca6

Browse files
authored
Merge pull request #59599 from ahoppen/pr/run-refactoring-test-linux
[refactoring] Run refactoring tests on Linux
2 parents d418b91 + ff129c3 commit 41cbca6

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

test/lit.cfg

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ if 'gmalloc' in lit_config.params:
312312
config.environment['MALLOC_LOG_FILE'] = '/dev/null'
313313
config.available_features.add('gmalloc')
314314

315+
config.python_unquoted = sys.executable
316+
config.python = shell_quote(config.python_unquoted)
315317
config.swift_frontend = inferSwiftBinary('swift-frontend')
316318
config.swift = inferSwiftBinary('swift')
317319
config.swiftc = inferSwiftBinary('swiftc')
@@ -482,8 +484,8 @@ config.substitutions.append( ('%llvm_obj_root', config.llvm_obj_root) )
482484
config.substitutions.append( ('%llvm_src_root', config.llvm_src_root) )
483485
config.substitutions.append( ('%swift_obj_root', config.swift_obj_root) )
484486
config.substitutions.append( ('%swift_src_root', config.swift_src_root) )
485-
config.substitutions.append( ('%{python}', shell_quote(sys.executable)) )
486-
config.substitutions.append( ('%{python.unquoted}', sys.executable) )
487+
config.substitutions.append( ('%{python}', config.python) )
488+
config.substitutions.append( ('%{python.unquoted}', config.python_unquoted) )
487489
config.substitutions.append( ('%mcp_opt', mcp_opt) )
488490
config.substitutions.append( ('%swift_driver_plain', "%r" % config.swift) )
489491
config.substitutions.append( ('%swiftc_driver_plain', "%r" % config.swiftc) )

test/refactoring/lit.local.cfg

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
1-
if 'OS=macosx' not in config.available_features:
2-
config.unsupported = True
3-
4-
else:
5-
config.substitutions.append(('%refactor-check-compiles', '{} -swift-refactor {} -swift-frontend {} -temp-dir %t {}'.format(config.refactor_check_compiles, config.swift_refactor, config.swift_frontend, config.resource_dir_opt)))
6-
config.substitutions.append(('%refactor', '{} {}'.format(config.swift_refactor,
7-
config.resource_dir_opt)))
1+
config.substitutions.append((r'%refactor-check-compiles', f'{config.python} {config.refactor_check_compiles} -swift-refactor {config.swift_refactor} -swift-frontend {config.swift_frontend} -temp-dir %t {config.resource_dir_opt}'))
2+
config.substitutions.append((r'%refactor', f'{config.swift_refactor} {config.resource_dir_opt}'))

0 commit comments

Comments
 (0)