Skip to content

[build-script] XCTest xcodebuild uses SWIFT_EXEC #1620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -1900,19 +1900,20 @@ for deployment_target in "${HOST_TARGET}" "${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]}"
continue
;;
xctest)
SWIFTC_BIN="$(build_directory_bin ${deployment_target} swift)/swiftc"
XCTEST_BUILD_DIR=$(build_directory ${deployment_target} xctest)
if [[ "$(uname -s)" == "Darwin" ]] ; then
set -x
xcodebuild \
-workspace "${XCTEST_SOURCE_DIR}"/XCTest.xcworkspace \
-scheme SwiftXCTest \
SWIFT_EXEC="${SWIFTC_BIN}" \
SKIP_INSTALL=NO \
DEPLOYMENT_LOCATION=YES \
DSTROOT="${XCTEST_BUILD_DIR}" \
INSTALL_PATH="/"
{ set +x; } 2>/dev/null
else
SWIFTC_BIN="$(build_directory_bin ${deployment_target} swift)/swiftc"
FOUNDATION_BUILD_DIR=$(build_directory ${deployment_target} foundation)
set -x
# FIXME: Use XCTEST_BUILD_TYPE (which is never properly
Expand Down Expand Up @@ -2168,14 +2169,15 @@ for deployment_target in "${STDLIB_DEPLOYMENT_TARGETS[@]}"; do
continue
fi
echo "--- Running tests for ${product} ---"
SWIFTC_BIN="$(build_directory_bin ${deployment_target} swift)/swiftc"
if [[ "$(uname -s)" == "Darwin" ]] ; then
set -x
xcodebuild \
-workspace "${XCTEST_SOURCE_DIR}"/XCTest.xcworkspace \
-scheme SwiftXCTestFunctionalTests
-scheme SwiftXCTestFunctionalTests \
SWIFT_EXEC="${SWIFTC_BIN}"
{ set +x; } 2>/dev/null
else
SWIFTC_BIN="$(build_directory_bin ${deployment_target} swift)/swiftc"
FOUNDATION_BUILD_DIR=$(build_directory ${deployment_target} foundation)
XCTEST_BUILD_DIR=$(build_directory ${deployment_target} xctest)
set -x
Expand Down