#!/usr/bin/env bash set -euo pipefail # Runs one in-process self-test phase against the built binary. # # ./scripts/run-selftest.sh panel # ./scripts/run-selftest.sh onedrive # ./scripts/run-selftest.sh sendtruth # # Prints the phase's PASS/FAIL lines and exits with the binary's status. ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" PHASE="${1:-panel}" BINARY="${ROOT}/.build/Redline.app/Contents/MacOS/Shotdeck" if [[ ! -x "${BINARY}" ]]; then BINARY="${ROOT}/.build/debug/Shotdeck" fi if [[ ! -x "${BINARY}" ]]; then echo "No Shotdeck binary found. Run swift build or ./scripts/build-app.sh first." >&2 exit 1 fi REDLINE_SELFTEST_PHASE="${PHASE}" "${BINARY}"