@@ -91,7 +91,7 @@ def should_test_parallel():
91
91
return True
92
92
93
93
94
- def handle_invocation (swift_exec , args ):
94
+ def handle_invocation (swift_exec , swift_frontend_exec , args ):
95
95
swiftpm_args = get_swiftpm_options (args )
96
96
97
97
env = os .environ
@@ -108,7 +108,8 @@ def handle_invocation(swift_exec, args):
108
108
if args .action == 'build' :
109
109
swiftpm ('build' , swift_exec , swiftpm_args , env )
110
110
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 )
112
113
test_args = swiftpm_args
113
114
if should_test_parallel ():
114
115
test_args += ['--parallel' ]
@@ -150,11 +151,13 @@ def add_common_args(parser):
150
151
args .toolchain = os .path .abspath (args .toolchain )
151
152
152
153
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' )
154
156
else :
155
157
swift_exec = 'swift'
158
+ swift_frontend_exec = 'swift-frontend'
156
159
157
- handle_invocation (swift_exec , args )
160
+ handle_invocation (swift_exec , swift_frontend_exec , args )
158
161
159
162
if __name__ == '__main__' :
160
163
main ()
0 commit comments