@@ -2589,24 +2589,26 @@ for host in "${ALL_HOSTS[@]}"; do
2589
2589
fi
2590
2590
2591
2591
SWIFTC_BIN=" $( build_directory_bin ${host} swift) /swiftc"
2592
+ SWIFT_LIB_DIR=" $( build_directory ${host} swift) " /lib/swift/
2592
2593
2593
2594
set -x
2594
2595
pushd " ${PLAYGROUNDSUPPORT_SOURCE_DIR} "
2595
2596
if [[ $( not ${SKIP_BUILD_OSX} ) ]]; then
2596
- " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-macOS -sdk macosx -arch x86_64 -derivedDataPath " ${build_dir} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO
2597
+ " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-macOS -sdk macosx -arch x86_64 -derivedDataPath " ${build_dir} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " SWIFT_LIBRARY_PATH= " ${SWIFT_LIB_DIR} / \$ (PLATFORM_NAME) " ONLY_ACTIVE_ARCH=NO
2597
2598
2598
2599
if [[ $( not ${SKIP_TEST_PLAYGROUNDSUPPORT} ) ]]; then
2599
2600
# If we're going to end up testing PlaygroundLogger/PlaygroundSupport, then we need to build the tests too.
2600
- " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-Test-PlaygroundLogger-macOS -sdk macosx -arch x86_64 -derivedDataPath " ${build_dir} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO BUILD_PLAYGROUNDLOGGER_TESTS=YES
2601
+ # Note that this *always* needs to run in Debug configuration.
2602
+ " xcodebuild" build-for-testing -configuration Debug -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-Test-PlaygroundLogger-macOS -sdk macosx -arch x86_64 -derivedDataPath " ${build_dir} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " SWIFT_LIBRARY_PATH=" ${SWIFT_LIB_DIR} /\$ (PLATFORM_NAME)" ONLY_ACTIVE_ARCH=NO
2601
2603
fi
2602
2604
fi
2603
2605
2604
2606
if [[ $( not ${SKIP_BUILD_IOS_SIMULATOR} ) ]]; then
2605
- " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-iOS -sdk iphonesimulator -arch x86_64 -derivedDataPath " ${build_dir} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO
2607
+ " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-iOS -sdk iphonesimulator -arch x86_64 -derivedDataPath " ${build_dir} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " SWIFT_LIBRARY_PATH= " ${SWIFT_LIB_DIR} / \$ (PLATFORM_NAME) " ONLY_ACTIVE_ARCH=NO
2606
2608
fi
2607
2609
2608
2610
if [[ $( not ${SKIP_BUILD_TVOS_SIMULATOR} ) ]]; then
2609
- " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-tvOS -sdk appletvsimulator -arch x86_64 -derivedDataPath " ${build_dir} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO
2611
+ " xcodebuild" -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-tvOS -sdk appletvsimulator -arch x86_64 -derivedDataPath " ${build_dir} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " SWIFT_LIBRARY_PATH= " ${SWIFT_LIB_DIR} / \$ (PLATFORM_NAME) " ONLY_ACTIVE_ARCH=NO
2610
2612
fi
2611
2613
popd
2612
2614
{ set +x; } 2> /dev/null
@@ -2992,13 +2994,14 @@ for host in "${ALL_HOSTS[@]}"; do
2992
2994
echo " Skipping PlaygroundLogger tests on non-macOS platform"
2993
2995
continue
2994
2996
fi
2997
+
2998
+ PLAYGROUNDSUPPORT_BUILD_DIR=$( build_directory ${host} ${product} )
2999
+ SWIFTC_BIN=" $( build_directory_bin ${host} swift) /swiftc"
3000
+ SWIFT_LIB_DIR=" $( build_directory ${host} swift) " /lib/swift/
2995
3001
2996
3002
set -x
2997
- SWIFT_DYLIB_PATH=$( build_directory ${host} swift) /lib/swift/macosx/
2998
- PLAYGROUNDLOGGER_FRAMEWORK_PATH=$( build_directory ${host} ${product} ) /DerivedData/Build/Products/${PLAYGROUNDSUPPORT_BUILD_TYPE}
2999
- pushd " ${PLAYGROUNDLOGGER_FRAMEWORK_PATH} "
3000
- DYLD_LIBRARY_PATH=$SWIFT_DYLIB_PATH DYLD_FRAMEWORK_PATH=$PLAYGROUNDLOGGER_FRAMEWORK_PATH ./PlaygroundLogger_TestDriver
3001
- popd
3003
+ with_pushd " ${PLAYGROUNDSUPPORT_SOURCE_DIR} " \
3004
+ " xcodebuild" test-without-building -configuration Debug -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-Test-PlaygroundLogger-macOS -sdk macosx -arch x86_64 -derivedDataPath " ${PLAYGROUNDSUPPORT_BUILD_DIR} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " SWIFT_LIBRARY_PATH=" ${SWIFT_LIB_DIR} /\$ (PLATFORM_NAME)" ONLY_ACTIVE_ARCH=NO
3002
3005
{ set +x; } 2> /dev/null
3003
3006
continue
3004
3007
;;
@@ -3315,15 +3318,15 @@ for host in "${ALL_HOSTS[@]}"; do
3315
3318
Darwin)
3316
3319
pushd " ${PLAYGROUNDSUPPORT_SOURCE_DIR} "
3317
3320
if [[ $( not ${SKIP_BUILD_OSX} ) ]]; then
3318
- " xcodebuild" install -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-macOS -sdk macosx -arch x86_64 -derivedDataPath " ${PLAYGROUNDSUPPORT_BUILD_DIR} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO DSTROOT=" $( get_host_install_destdir ${host} ) " TOOLCHAIN_INSTALL_DIR=" ${TOOLCHAIN_PREFIX} " BUILD_PLAYGROUNDLOGGER_TESTS=NO
3321
+ " xcodebuild" install -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-macOS -sdk macosx -arch x86_64 -derivedDataPath " ${PLAYGROUNDSUPPORT_BUILD_DIR} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " SWIFT_LIBRARY_PATH= " ${SWIFT_LIB_DIR} / \$ (PLATFORM_NAME) " ONLY_ACTIVE_ARCH=NO DSTROOT=" $( get_host_install_destdir ${host} ) " TOOLCHAIN_INSTALL_DIR=" ${TOOLCHAIN_PREFIX} " BUILD_PLAYGROUNDLOGGER_TESTS=NO
3319
3322
fi
3320
3323
3321
3324
if [[ $( not ${SKIP_BUILD_IOS_SIMULATOR} ) ]]; then
3322
- " xcodebuild" install -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-iOS -sdk iphonesimulator -arch x86_64 -derivedDataPath " ${PLAYGROUNDSUPPORT_BUILD_DIR} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO DSTROOT=" $( get_host_install_destdir ${host} ) " TOOLCHAIN_INSTALL_DIR=" ${TOOLCHAIN_PREFIX} " BUILD_PLAYGROUNDLOGGER_TESTS=NO
3325
+ " xcodebuild" install -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-iOS -sdk iphonesimulator -arch x86_64 -derivedDataPath " ${PLAYGROUNDSUPPORT_BUILD_DIR} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " SWIFT_LIBRARY_PATH= " ${SWIFT_LIB_DIR} / \$ (PLATFORM_NAME) " ONLY_ACTIVE_ARCH=NO DSTROOT=" $( get_host_install_destdir ${host} ) " TOOLCHAIN_INSTALL_DIR=" ${TOOLCHAIN_PREFIX} " BUILD_PLAYGROUNDLOGGER_TESTS=NO
3323
3326
fi
3324
3327
3325
3328
if [[ $( not ${SKIP_BUILD_TVOS_SIMULATOR} ) ]]; then
3326
- " xcodebuild" install -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-tvOS -sdk appletvsimulator -arch x86_64 -derivedDataPath " ${PLAYGROUNDSUPPORT_BUILD_DIR} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " ONLY_ACTIVE_ARCH=NO DSTROOT=" $( get_host_install_destdir ${host} ) " TOOLCHAIN_INSTALL_DIR=" ${TOOLCHAIN_PREFIX} " BUILD_PLAYGROUNDLOGGER_TESTS=NO
3329
+ " xcodebuild" install -configuration " ${PLAYGROUNDSUPPORT_BUILD_TYPE} " -workspace swift-xcode-playground-support.xcworkspace -scheme BuildScript-tvOS -sdk appletvsimulator -arch x86_64 -derivedDataPath " ${PLAYGROUNDSUPPORT_BUILD_DIR} " /DerivedData SWIFT_EXEC=" ${SWIFTC_BIN} " SWIFT_LIBRARY_PATH= " ${SWIFT_LIB_DIR} / \$ (PLATFORM_NAME) " ONLY_ACTIVE_ARCH=NO DSTROOT=" $( get_host_install_destdir ${host} ) " TOOLCHAIN_INSTALL_DIR=" ${TOOLCHAIN_PREFIX} " BUILD_PLAYGROUNDLOGGER_TESTS=NO
3327
3330
fi
3328
3331
popd
3329
3332
continue
0 commit comments