Voxley / app · voxley.si / Scripts / test-app.sh
| 1 | #!/bin/bash |
| 2 | set -euo pipefail |
| 3 | root="$(cd "$(dirname "$0")/.." && pwd)" |
| 4 | output="/Volumes/Expand/Projects/Voxley/app-work" |
| 5 | [[ -d /Volumes/Expand ]] || { echo 'Mount Expand before testing Voxley.' >&2; exit 1; } |
| 6 | mkdir -p "$output/Build/tmp" "$output/Build/modules" "$output/Build/cache" |
| 7 | export TMPDIR="$output/Build/tmp/" |
| 8 | export CLANG_MODULE_CACHE_PATH="$output/Build/modules" |
| 9 | export SWIFTPM_MODULECACHE_OVERRIDE="$output/Build/modules" |
| 10 | if [[ "${1:-}" == --with-models ]]; then |
| 11 | export VOXLEY_TEST_AUDIO="$output/Build/tmp/apple-model-test.aiff" |
| 12 | /usr/bin/say -v Samantha -o "$VOXLEY_TEST_AUDIO" 'Please bring the purple elephant sketch to the meeting.' |
| 13 | fi |
| 14 | xcrun swift test --no-parallel --package-path "$root" --scratch-path "$output/Build/swiftpm" --cache-path "$output/Build/cache" |