@@ -91,7 +91,7 @@ def should_test_parallel():
9191 return True
9292
9393
94- def handle_invocation (swift_exec , args ):
94+ def handle_invocation (swift_exec , swift_frontend_exec , args ):
9595 swiftpm_args = get_swiftpm_options (args )
9696
9797 env = os .environ
@@ -108,7 +108,8 @@ def handle_invocation(swift_exec, args):
108108 if args .action == 'build' :
109109 swiftpm ('build' , swift_exec , swiftpm_args , env )
110110 elif args .action == 'test' :
111- env ['SWIFT_DRIVER_SWIFT_FRONTEND_EXEC' ] = '%sc' % (swift_exec )
111+ env ['SWIFT_DRIVER_SWIFT_FRONTEND_EXEC' ] = '%s' % (swift_frontend_exec )
112+ env ['SWIFT_EXEC' ] = '%sc' % (swift_exec )
112113 test_args = swiftpm_args
113114 if should_test_parallel ():
114115 test_args += ['--parallel' ]
@@ -150,11 +151,13 @@ def add_common_args(parser):
150151 args .toolchain = os .path .abspath (args .toolchain )
151152
152153 if args .toolchain :
153- swift_exec = os .path .join (args .toolchain , 'bin' , 'swift-frontend' )
154+ swift_exec = os .path .join (args .toolchain , 'bin' , 'swift' )
155+ swift_frontend_exec = os .path .join (args .toolchain , 'bin' , 'swift-frontend' )
154156 else :
155157 swift_exec = 'swift'
158+ swift_frontend_exec = 'swift-frontend'
156159
157- handle_invocation (swift_exec , args )
160+ handle_invocation (swift_exec , swift_frontend_exec , args )
158161
159162if __name__ == '__main__' :
160163 main ()
0 commit comments