SPB Git

Repository Public License

test.sh 1.1 KB 23 lines shellscript

1#!/usr/bin/env bash2# ORIX Audio3# File: Scripts/test.sh4# Description: Runs the test suites. core = Swift package (macOS), app = app unit tests (simulator), ui = XCUITest (simulator).5#6# Author: Simon-Pierre Boucher7# Contact: contact@spboucher.ai8#9# usage: Scripts/test.sh core|app|ui [simulator name]10set -uo pipefail11cd "$(dirname "$0")/.."12S="${2:-ORIXAudio iPhone}"13case "${1:-}" in14core) cd Core && swift test 2>&1 | sed 's/\x1b\[[0-9;]*m//g' | grep -E "✘|Test run|error:" ;;15app|ui)16  xcodegen generate >/dev/null17  TARGET=ORIXAudioTests; [ "$1" = ui ] && TARGET=ORIXAudioUITests18  xcodebuild test -project ORIXAudio.xcodeproj -scheme ORIXAudio -destination "platform=iOS Simulator,name=$S" -derivedDataPath build/dd \19    -only-testing:$TARGET -parallel-testing-enabled NO CODE_SIGNING_ALLOWED=NO 2>&1 \20    | grep -E "error:|✘|✔ Test run|Test Case .*(passed|failed)|recorded an issue|Executed [0-9]+ tests|TEST (SUCCEEDED|FAILED)|Suite .* (passed|failed)" | sed "s|$PWD/||" | grep -v "^ *|" | tail -${LINES_MAX:-60} ;;21*) echo "usage: $0 core|app|ui [simulator]"; exit 2 ;;22esac23
Files main
Menu

Theme