Skip to content

Fix fallback to iphonesimulator in script/cibuild #552

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
Feb 17, 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
10 changes: 5 additions & 5 deletions script/cibuild
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ build_scheme ()
echo "*** Building and testing $scheme..."
echo

local sdkflag=
local sdkflags=()
local action=test

# Determine whether we can run unit tests for this target.
Expand All @@ -129,17 +129,17 @@ build_scheme ()
if [ "$awkstatus" -eq "1" ]
then
# SDK not found, try for iphonesimulator.
sdkflag='-sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 5"'
sdkflags=(-sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 5")

# Determine whether the unit tests will run with iphonesimulator
run_xctool "$sdkflag" -scheme "$scheme" run-tests | parse_build
run_xctool "${sdkflags[@]}" -scheme "$scheme" run-tests | parse_build

awkstatus=$?

if [ "$awkstatus" -ne "0" ]
then
# Unit tests will not run on iphonesimulator.
sdkflag=""
sdkflags=()
fi
fi

Expand All @@ -149,7 +149,7 @@ build_scheme ()
action=build
fi

run_xctool $sdkflag -scheme "$scheme" $action
run_xctool "${sdkflags[@]}" -scheme "$scheme" $action
}

export -f build_scheme
Expand Down