Skip to content
Closed
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
15 changes: 12 additions & 3 deletions scripts/test-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,21 @@ for runtime in reversed(runtimes):
sys.exit("No available iPhone simulator.")
')

# Boot first, so the tests do not compete with a cold simulator start.
xcrun simctl bootstatus "$device" -b >/dev/null
# Boot while building: building needs no booted simulator, and a cold boot takes minutes on CI. The tests
# start only once the boot finished, so they do not compete with it.
xcrun simctl bootstatus "$device" -b >/dev/null &
boot=$!

xcodebuild build-for-testing \
-scheme PassportKit-Package \
-destination "id=$device" \
-derivedDataPath .build/ios

wait "$boot"

results=.build/ios/TestResults.xcresult
rm -rf "$results"
xcodebuild test \
xcodebuild test-without-building \
-scheme PassportKit-Package \
-destination "id=$device" \
-derivedDataPath .build/ios \
Expand Down
Loading