27 lines
777 B
Bash
Executable File
27 lines
777 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
cd "$ROOT"
|
|
if ! command -v xcodebuild >/dev/null 2>&1; then
|
|
echo "ERROR: Xcode and xcodebuild are required on macOS." >&2
|
|
exit 1
|
|
fi
|
|
mkdir -p test-results
|
|
STAMP="$(date +%Y%m%d-%H%M%S)"
|
|
RESULT="$ROOT/test-results/DBSyn-$STAMP.xcresult"
|
|
LOG="$ROOT/test-results/DBSyn-$STAMP.log"
|
|
echo "Running DBSyn XCTest suite. Log: $LOG"
|
|
set +e
|
|
xcodebuild test \
|
|
-project DBSyn.xcodeproj \
|
|
-scheme DBSyn \
|
|
-configuration Debug \
|
|
-destination 'platform=macOS,arch=arm64' \
|
|
-derivedDataPath "$ROOT/build" \
|
|
-resultBundlePath "$RESULT" \
|
|
CODE_SIGNING_ALLOWED=NO 2>&1 | tee "$LOG"
|
|
STATUS=${PIPESTATUS[0]}
|
|
set -e
|
|
printf '\nTest log: %s\nTest results: %s\n' "$LOG" "$RESULT"
|
|
exit "$STATUS"
|