@@ -326,14 +326,14 @@ config.swift_frontend_test_options = os.environ.get('SWIFT_FRONTEND_TEST_OPTIONS
326
326
config .swift_driver_test_options = os .environ .get ('SWIFT_DRIVER_TEST_OPTIONS' , '' )
327
327
config .sil_test_options = os .environ .get ('SIL_TEST_OPTIONS' , '' )
328
328
329
- clang_module_cache_path = config .swift_test_results_dir + "/ clang-module-cache"
329
+ clang_module_cache_path = os . path . join ( config .swift_test_results_dir , " clang-module-cache")
330
330
shutil .rmtree (clang_module_cache_path , ignore_errors = True )
331
331
mcp_opt = "-module-cache-path %r" % clang_module_cache_path
332
332
clang_mcp_opt = "-fmodules-cache-path=%r" % clang_module_cache_path
333
333
lit_config .note ("Using Clang module cache: " + clang_module_cache_path )
334
334
lit_config .note ("Using test results dir: " + config .swift_test_results_dir )
335
335
336
- completion_cache_path = config .swift_test_results_dir + "/ completion-cache"
336
+ completion_cache_path = os . path . join ( config .swift_test_results_dir , " completion-cache")
337
337
shutil .rmtree (completion_cache_path , ignore_errors = True )
338
338
ccp_opt = "-completion-cache-path %r" % completion_cache_path
339
339
lit_config .note ("Using code completion cache: " + completion_cache_path )
@@ -379,23 +379,16 @@ config.substitutions.append(
379
379
'%target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-module -o %t %clang-importer-sdk-path/swift-modules/Foundation.swift' ))
380
380
381
381
# FIXME: BEGIN -enable-source-import hackaround
382
- config .substitutions .append (
383
- ('%clang-importer-sdk-path' ,
384
- '%r/Inputs/clang-importer-sdk' %
385
- (config .test_source_root ) ) )
382
+ config .substitutions .append (('%clang-importer-sdk-path' ,
383
+ '%r' % (os .path .join (config .test_source_root , 'Inputs' , 'clang-importer-sdk' ))))
386
384
387
- config .substitutions .append (
388
- ('%clang-importer-sdk-nosource' ,
389
- '-sdk %r/Inputs/clang-importer-sdk ' %
390
- (config .test_source_root ) ) )
385
+ config .substitutions .append (('%clang-importer-sdk-nosource' ,
386
+ '-sdk %r' % (os .path .join (config .test_source_root , 'Inputs' , 'clang-importer-sdk' ))))
391
387
# FIXME: END -enable-source-import hackaround
392
388
393
- config .substitutions .append (
394
- ('%clang-importer-sdk' ,
395
- '-enable-source-import '
396
- '-sdk %r/Inputs/clang-importer-sdk '
397
- '-I %r/Inputs/clang-importer-sdk/swift-modules ' %
398
- (config .test_source_root , config .test_source_root ) ) )
389
+ config .substitutions .append (('%clang-importer-sdk' ,
390
+ '-enable-source-import -sdk %r -I %r ' % (os .path .join (config .test_source_root , 'Inputs' , 'clang-importer-sdk' ),
391
+ os .path .join (config .test_source_root , 'Inputs' , 'clang-importer-sdk' , 'swift-modules' ))))
399
392
400
393
config .substitutions .append ( ('%clang_apinotes' ,
401
394
"%r -cc1apinotes" %
0 commit comments