8000 Merge pull request #49 from nkcsgexi/use-swiftc-for-test · swiftlang/swift-syntax@98447f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 98447f5

Browse files
authored
Merge pull request #49 from nkcsgexi/use-swiftc-for-test
build-script: use just-built swiftc for testing purposes too.
2 parents 9f7918e + 1aeb642 commit 98447f5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

build-script.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def run_lit_tests(swift_build_exec, build_dir, release, swiftc_exec,
264264
lit_call.extend([PACKAGE_DIR + '/lit_tests'])
265265

266266
if swiftc_exec:
267-
lit_call.extend(['--param', 'SWIFTC=' + swiftc_exec])
267+
lit_call.extend(['--param', 'SWIFTC=' + realpath(swiftc_exec)])
268268
if filecheck_exec:
269269
lit_call.extend(['--param', 'FILECHECK=' + filecheck_exec])
270270
if lit_test_helper_exec:
@@ -280,7 +280,6 @@ def run_lit_tests(swift_build_exec, build_dir, release, swiftc_exec,
280280
# Don't show all commands if verbose is not enabled
281281
if not verbose:
282282
lit_call.extend(['--succinct'])
283-
284283
return call(lit_call, verbose=verbose) == 0
285284

286285

@@ -299,7 +298,7 @@ def run_xctests(swift_test_exec, build_dir, release, swiftc_exec, verbose):
299298
if swiftc_exec:
300299
# Add the swiftc exec to PATH so that SwiftSyntax finds it
301300
subenv['PATH'] = realpath(swiftc_exec + '/..') + ':' + subenv['PATH']
302-
301+
subenv['SWIFT_EXEC'] = swiftc_exec
303302
return call(swiftpm_call, env=subenv, verbose=verbose) == 0
304303

305304
def delete_rpath(rpath, binary):
@@ -478,7 +477,7 @@ def main():
478477
release=args.release,
479478
swift_build_exec=args.swift_build_exec,
480479
filecheck_exec=realpath(args.filecheck_exec),
481-
swiftc_exec=realpath(args.swiftc_exec),
480+
swiftc_exec=args.swiftc_exec,
482481
swift_syntax_test_exec=
483482
realpath(args.swift_syntax_test_exec),
484483
verbose=args.verbose)

0 commit comments

Comments
 (0)
0