Skip to content

Commit 21f0c04

Browse files
committed
[Bootstrap] Build SwiftPM with the integrated Swift driver
While here, filter down the set of tests to run
1 parent fcaec04 commit 21f0c04

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

Utilities/bootstrap

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def build(args):
280280
build_yams(args)
281281
build_swift_driver(args)
282282
build_swiftpm_with_cmake(args)
283-
build_swiftpm_with_swiftpm(args)
283+
build_swiftpm_with_swiftpm(args,integrated_swift_driver=False)
284284

285285
def test(args):
286286
"""Builds SwiftPM, then tests itself."""
@@ -301,9 +301,17 @@ def test(args):
301301
# Test SwiftPM.
302302
call_swiftpm(args, cmd)
303303

304-
# Test SwiftPM with the integrated driver.
304+
# Build SwiftPM with the integrated driver.
305+
note("Bootstrap with the integrated Swift driver")
306+
build_swiftpm_with_swiftpm(args,integrated_swift_driver=True)
307+
308+
# Test SwiftPM with the integrated driver. Only the build and
309+
# functional tests are interesting.
305310
integratedDriverCmd = cmd
306311
integratedDriverCmd.append("--use-integrated-swift-driver")
312+
if args.filter:
313+
integratedDriverCmd.append("--filter")
314+
integratedDriverCmd.append("BuildTests;FunctionalTests")
307315
call_swiftpm(args, integratedDriverCmd)
308316

309317
def install(args):
@@ -511,16 +519,20 @@ def build_swiftpm_with_cmake(args):
511519
add_rpath_for_cmake_build(args, os.path.join(args.yams_build_dir, "lib"))
512520
add_rpath_for_cmake_build(args, os.path.join(args.swift_driver_build_dir, "lib"))
513521

514-
def build_swiftpm_with_swiftpm(args):
522+
def build_swiftpm_with_swiftpm(args, integrated_swift_driver):
515523
"""Builds SwiftPM using the version of SwiftPM built with CMake."""
516524
note("Building SwiftPM (with swift-build)")
517525

518-
call_swiftpm(args, [
526+
swiftpm_args = [
519527
"SWIFT_EXEC=" + args.swiftc_path,
520528
"SWIFTPM_PD_LIBS=" + os.path.join(args.bootstrap_dir, "pm"),
521529
os.path.join(args.bootstrap_dir, "bin/swift-build"),
522530
"--disable-sandbox",
523-
])
531+
]
532+
if integrated_swift_driver:
533+
swiftpm_args.append("--use-integrated-swift-driver")
534+
535+
call_swiftpm(args, swiftpm_args)
524536

525537
# Setup symlinks that'll allow using swiftpm from the build directory.
526538
symlink_force(args.swiftc_path, os.path.join(args.target_dir, args.conf, "swiftc"))

0 commit comments

Comments
 (0)