@@ -326,14 +326,14 @@ config.swift_frontend_test_options = os.environ.get('SWIFT_FRONTEND_TEST_OPTIONS
326326config .swift_driver_test_options = os .environ .get ('SWIFT_DRIVER_TEST_OPTIONS' , '' )
327327config .sil_test_options = os .environ .get ('SIL_TEST_OPTIONS' , '' )
328328
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")
330330shutil .rmtree (clang_module_cache_path , ignore_errors = True )
331331mcp_opt = "-module-cache-path %r" % clang_module_cache_path
332332clang_mcp_opt = "-fmodules-cache-path=%r" % clang_module_cache_path
333333lit_config .note ("Using Clang module cache: " + clang_module_cache_path )
334334lit_config .note ("Using test results dir: " + config .swift_test_results_dir )
335335
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")
337337shutil .rmtree (completion_cache_path , ignore_errors = True )
338338ccp_opt = "-completion-cache-path %r" % completion_cache_path
339339lit_config .note ("Using code completion cache: " + completion_cache_path )
@@ -379,23 +379,16 @@ config.substitutions.append(
379379 '%target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-module -o %t %clang-importer-sdk-path/swift-modules/Foundation.swift' ))
380380
381381# 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' ))))
386384
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' ))))
391387# FIXME: END -enable-source-import hackaround
392388
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' ))))
399392
400393config .substitutions .append ( ('%clang_apinotes' ,
401394 "%r -cc1apinotes" %
0 commit comments