@@ -2594,24 +2594,26 @@ for host in "${ALL_HOSTS[@]}"; do
2594
2594
fi
2595
2595
2596
2596
SWIFTC_BIN=" $( build_directory_bin ${host} swift) /swiftc"
2597
+ SWIFT_LIB_DIR=" $( build_directory ${host} swift) " /lib/swift/
2597
2598
2598
2599
set -x
2599
2600
pushd " ${PLAYGROUNDSUPPORT_SOURCE_DIR} "
2600
2601
if [[ $( not ${SKIP_BUILD_OSX} ) ]]; then
2601
- " 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
2602
+ " 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
2602
2603
2603
2604
if [[ $( not ${SKIP_TEST_PLAYGROUNDSUPPORT} ) ]]; then
2604
2605
# If we're going to end up testing PlaygroundLogger/PlaygroundSupport, then we need to build the tests too.
2605
- " 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
2606
+ # Note that this *always* needs to run in Debug configuration.
2607
+ " 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
2606
2608
fi
2607
2609
fi
2608
2610
2609
2611
if [[ $( not ${SKIP_BUILD_IOS_SIMULATOR} ) ]]; then
2610
- " 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
2612
+ " 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
2611
2613
fi
2612
2614
2613
2615
if [[ $( not ${SKIP_BUILD_TVOS_SIMULATOR} ) ]]; then
2614
- " 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
2616
+ " 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
2615
2617
fi
2616
2618
popd
2617
2619
{ set +x; } 2> /dev/null
@@ -2997,13 +2999,14 @@ for host in "${ALL_HOSTS[@]}"; do
2997
2999
echo " Skipping PlaygroundLogger tests on non-macOS platform"
2998
3000
continue
2999
3001
fi
3002
+
3003
+ PLAYGROUNDSUPPORT_BUILD_DIR=$( build_directory ${host} ${product} )
3004
+ SWIFTC_BIN=" $( build_directory_bin ${host} swift) /swiftc"
3005
+ SWIFT_LIB_DIR=" $( build_directory ${host} swift) " /lib/swift/
3000
3006
3001
3007
set -x
3002
- SWIFT_DYLIB_PATH=$( build_directory ${host} swift) /lib/swift/macosx/
3003
- PLAYGROUNDLOGGER_FRAMEWORK_PATH=$( build_directory ${host} ${product} ) /DerivedData/Build/Products/${PLAYGROUNDSUPPORT_BUILD_TYPE}
3004
- pushd " ${PLAYGROUNDLOGGER_FRAMEWORK_PATH} "
3005
- DYLD_LIBRARY_PATH=$SWIFT_DYLIB_PATH DYLD_FRAMEWORK_PATH=$PLAYGROUNDLOGGER_FRAMEWORK_PATH ./PlaygroundLogger_TestDriver
3006
- popd
3008
+ with_pushd " ${PLAYGROUNDSUPPORT_SOURCE_DIR} " \
3009
+ " 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
3007
3010
{ set +x; } 2> /dev/null
3008
3011
continue
3009
3012
;;
@@ -3320,15 +3323,15 @@ for host in "${ALL_HOSTS[@]}"; do
3320
3323
Darwin)
3321
3324
pushd " ${PLAYGROUNDSUPPORT_SOURCE_DIR} "
3322
3325
if [[ $( not ${SKIP_BUILD_OSX} ) ]]; then
3323
- " 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
3326
+ " 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
3324
3327
fi
3325
3328
3326
3329
if [[ $( not ${SKIP_BUILD_IOS_SIMULATOR} ) ]]; then
3327
- " 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
3330
+ " 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
3328
3331
fi
3329
3332
3330
3333
if [[ $( not ${SKIP_BUILD_TVOS_SIMULATOR} ) ]]; then
3331
- " 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
3334
+ " 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
3332
3335
fi
3333
3336
popd
3334
3337
continue
0 commit comments