Repository Public
1#!/usr/bin/env bash2# Author: Simon-Pierre Boucher — contact@spboucher.ai3# File: Scripts/integration-test.sh4# Description: Runs the hosted application tests; with --server, also the end-to-end synchronisation tests against the DEVELOPMENT backend (never production) through an SSH tunnel.5#6# Usage: Scripts/integration-test.sh [--server] [-only-testing:SPNotesTests/Class/testName …]7# The app process that hosts the tests shows no window and never becomes active.8set -euo pipefail9cd "$(dirname "$0")/.."10ENVV=()11if [[ "${1:-}" == "--server" ]]; then shift; eval "$(Scripts/dev-session.sh)"; ENVV=(TEST_RUNNER_SPNOTES_IT_SERVER="$SPNOTES_SERVER" TEST_RUNNER_SPNOTES_IT_TOKEN="$SPNOTES_SESSION_TOKEN"); fi12xcodegen generate --quiet13env ${ENVV[@]+"${ENVV[@]}"} xcodebuild -project SPNotes.xcodeproj -scheme SPNotes -configuration Debug -derivedDataPath "${SPNOTES_DD:-$HOME/Library/Developer/SPNotes/DerivedData}" -destination 'platform=macOS,arch=arm64' test "$@" 2>&1 \14 | grep -v "Connection\]\|appintents" | grep -E "error:|Test Case .*(passed|failed)|Executed|\*\* TEST|XCTAssert|skipped|PERF|AI summarize" | sed "s#$PWD/##" | awk '!seen[$0]++'15