PulseCanvas / app · pulsecanvas.ai / scripts / test-vision-ui.sh
| 1 | #!/bin/bash |
| 2 | # Runs the visionOS UI tests (visionOS/UITests) on a simulator. Every test launches the app with -PCUITesting, which |
| 3 | # uses fresh temporary storage, so the simulator's own PulseCanvas projects are left alone. |
| 4 | # scripts/test-vision-ui.sh ["Apple Vision Pro" | <simulator UDID>] [extra xcodebuild args, e.g. -only-testing:...] |
| 5 | set -euo pipefail |
| 6 | cd "$(dirname "$0")/.." |
| 7 | device="${1:-Apple Vision Pro}"; shift || true |
| 8 | python3 scripts/generate-vision-project.py >/dev/null |
| 9 | if [[ "$device" =~ ^[0-9A-F-]{36}$ ]]; then destination="platform=visionOS Simulator,id=$device" |
| 10 | else destination="platform=visionOS Simulator,name=$device"; fi |
| 11 | xcodebuild -project PulseCanvasVision.xcodeproj -scheme PulseCanvasVision -configuration Debug \ |
| 12 | -destination "$destination" -derivedDataPath .build/vision-uitests -parallel-testing-enabled NO "$@" test |