@@ -280,7 +280,7 @@ def build(args):
280
280
build_yams (args )
281
281
build_swift_driver (args )
282
282
build_swiftpm_with_cmake (args )
283
- build_swiftpm_with_swiftpm (args )
283
+ build_swiftpm_with_swiftpm (args , integrated_swift_driver = False )
284
284
285
285
def test (args ):
286
286
"""Builds SwiftPM, then tests itself."""
@@ -301,9 +301,17 @@ def test(args):
301
301
# Test SwiftPM.
302
302
call_swiftpm (args , cmd )
303
303
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.
305
310
integratedDriverCmd = cmd
306
311
integratedDriverCmd .append ("--use-integrated-swift-driver" )
312
+ if args .filter :
313
+ integratedDriverCmd .append ("--filter" )
314
+ integratedDriverCmd .append ("BuildTests;FunctionalTests" )
307
315
call_swiftpm (args , integratedDriverCmd )
308
316
309
317
def install (args ):
@@ -511,16 +519,20 @@ def build_swiftpm_with_cmake(args):
511
519
add_rpath_for_cmake_build (args , os .path .join (args .yams_build_dir , "lib" ))
512
520
add_rpath_for_cmake_build (args , os .path .join (args .swift_driver_build_dir , "lib" ))
513
521
514
- def build_swiftpm_with_swiftpm (args ):
522
+ def build_swiftpm_with_swiftpm (args , integrated_swift_driver ):
515
523
"""Builds SwiftPM using the version of SwiftPM built with CMake."""
516
524
note ("Building SwiftPM (with swift-build)" )
517
525
518
- call_swiftpm ( args , [
526
+ swiftpm_args = [
519
527
"SWIFT_EXEC=" + args .swiftc_path ,
520
528
"SWIFTPM_PD_LIBS=" + os .path .join (args .bootstrap_dir , "pm" ),
521
529
os .path .join (args .bootstrap_dir , "bin/swift-build" ),
522
530
"--disable-sandbox" ,
523
- ])
531
+ ]
532
+ if integrated_swift_driver :
533
+ swiftpm_args .append ("--use-integrated-swift-driver" )
534
+
535
+ call_swiftpm (args , swiftpm_args )
524
536
525
537
# Setup symlinks that'll allow using swiftpm from the build directory.
526
538
symlink_force (args .swiftc_path , os .path .join (args .target_dir , args .conf , "swiftc" ))
0 commit comments