From a2d0cf11a9fbbb1de76a41158f8260ba386798b7 Mon Sep 17 00:00:00 2001 From: Mark Gregory Date: Mon, 19 Oct 2026 09:53:26 +0100 Subject: [PATCH] new tests broken --- scripts/run-tests.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 7e36214..7106bba 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -1,9 +1,9 @@ -#!/usr/bin/env bash +#!/bin/bash set -euo pipefail -ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT="$(cd -- "$(dirname -- "$0")" && pwd)" cd "$ROOT" if ! command -v xcodebuild >/dev/null 2>&1; then - echo "ERROR: Xcode and xcodebuild are required on macOS." >&2 + echo 'ERROR: Xcode and xcodebuild are required on macOS.' >&2 exit 1 fi mkdir -p test-results @@ -18,14 +18,13 @@ if xcodebuild test \ -destination 'platform=macOS,arch=arm64' \ -derivedDataPath "$ROOT/build" \ -resultBundlePath "$RESULT" \ - -arch arm64 \ ONLY_ACTIVE_ARCH=YES \ ENABLE_TESTABILITY=YES \ SWIFT_ENABLE_EXPLICIT_MODULES=NO \ CODE_SIGNING_ALLOWED=NO 2>&1 | tee "$LOG"; then STATUS=0 else - STATUS=$? + STATUS=${PIPESTATUS[0]} fi printf '\nTest log: %s\nTest results: %s\n' "$LOG" "$RESULT" exit "$STATUS"