test.sh
bash
sha256:bd1eb24434d281fe65142038c1bf217493421f5a86880c22dff7e6037d2d4700
feat(companion): add production macOS distribution path
Human
minor
⚠ breaking
24 days ago
| 1 | #!/bin/bash |
| 2 | set -euo pipefail |
| 3 | |
| 4 | repo_root="$(cd "$(dirname "$0")/../../.." && pwd)" |
| 5 | app="" |
| 6 | full=0 |
| 7 | while [[ $# -gt 0 ]]; do |
| 8 | case "$1" in |
| 9 | --app) app="$2"; shift 2 ;; |
| 10 | --full) full=1; shift ;; |
| 11 | *) echo "unknown argument: $1" >&2; exit 2 ;; |
| 12 | esac |
| 13 | done |
| 14 | |
| 15 | mkdir -p "$repo_root/build" |
| 16 | swift_scratch="$(mktemp -d "$repo_root/build/swift-tests.XXXXXX")" |
| 17 | trap 'rm -rf "$swift_scratch"' EXIT |
| 18 | env \ |
| 19 | CLANG_MODULE_CACHE_PATH="$swift_scratch/clang-cache" \ |
| 20 | SWIFTPM_MODULECACHE_OVERRIDE="$swift_scratch/swiftpm-cache" \ |
| 21 | swift test \ |
| 22 | --disable-sandbox \ |
| 23 | --package-path "$repo_root/companion/macos" \ |
| 24 | --scratch-path "$swift_scratch" |
| 25 | node --test \ |
| 26 | "$repo_root/test/release-macos-manifest.test.mjs" \ |
| 27 | "$repo_root/test/release-macos-layout.test.mjs" \ |
| 28 | "$repo_root/test/release-macos-caller-policy.test.mjs" \ |
| 29 | "$repo_root/test/release-macos-lifecycle.test.mjs" \ |
| 30 | "$repo_root/test/release-macos-update-policy.test.mjs" \ |
| 31 | "$repo_root/test/release-macos-runtime-closure.test.mjs" \ |
| 32 | "$repo_root/test/companion-runtime-oauth-session.test.mjs" \ |
| 33 | "$repo_root/test/companion-oauth-flow-bind.test.mjs" \ |
| 34 | "$repo_root/test/native-oauth-refresh-durability.test.mjs" |
| 35 | |
| 36 | if [[ -n "$app" ]]; then |
| 37 | test -f "$app/Contents/Resources/runtime-manifest.json" |
| 38 | test -x "$app/Contents/MacOS/Knowtation" |
| 39 | test -x "$app/Contents/Helpers/knowtation" |
| 40 | test -x "$app/Contents/Helpers/knowtation-mcp" |
| 41 | node "$repo_root/scripts/release/macos/verify-runtime-manifest.mjs" --app "$app" |
| 42 | node --experimental-vm-modules --no-warnings \ |
| 43 | "$repo_root/scripts/release/macos/verify-module-closure.mjs" \ |
| 44 | --runtime "$app/Contents/Resources/runtime" |
| 45 | "$app/Contents/Resources/runtime/node/bin/node" \ |
| 46 | "$repo_root/scripts/release/macos/smoke-inference.mjs" \ |
| 47 | --runtime "$app/Contents/Resources/runtime" |
| 48 | fi |
| 49 | |
| 50 | if [[ "$full" == 1 ]]; then |
| 51 | npm test --prefix "$repo_root" |
| 52 | fi |
File History
1 commit
sha256:bd1eb24434d281fe65142038c1bf217493421f5a86880c22dff7e6037d2d4700
feat(companion): add production macOS distribution path
Human
minor
⚠
24 days ago