Skip to content

Commit

Permalink
skip tests on visionOS if it's not present
Browse files Browse the repository at this point in the history
  • Loading branch information
stonko1994 committed Nov 4, 2023
1 parent 78b4e76 commit b86604f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ function test_watchos {
}

function test_visionos {
if [[ -z $LATEST_VISIONOS_SDK_VERSION ]]; then
echo "visionOS is not supported on this machine"
return
fi

run set -o pipefail && xcodebuild -project Nimble.xcodeproj -scheme "Nimble" -configuration "Debug" -destination "generic/platform=visionOS" OTHER_SWIFT_FLAGS='$(inherited) -suppress-warnings' build | xcpretty

run osascript -e 'tell app "Simulator" to quit'
Expand Down Expand Up @@ -133,6 +138,11 @@ function test_xcode_spm_watchos {
}

function test_xcode_spm_visionos {
if [[ -z $LATEST_VISIONOS_SDK_VERSION ]]; then
echo "visionOS is not supported on this machine"
return
fi

run osascript -e 'tell app "Simulator" to quit'
mv Nimble.xcodeproj Nimble.xcodeproj.bak
trap 'mv Nimble.xcodeproj.bak Nimble.xcodeproj' EXIT
Expand Down

0 comments on commit b86604f

Please sign in to comment.