diff --git a/Packages/BitMatchEngine/Tests/BitMatchEngineTests/Issue10ExFATHandoffTests.swift b/Packages/BitMatchEngine/Tests/BitMatchEngineTests/Issue10ExFATHandoffTests.swift index 59cb9d0b..160417ec 100644 --- a/Packages/BitMatchEngine/Tests/BitMatchEngineTests/Issue10ExFATHandoffTests.swift +++ b/Packages/BitMatchEngine/Tests/BitMatchEngineTests/Issue10ExFATHandoffTests.swift @@ -66,8 +66,13 @@ final class Issue10ExFATHandoffTests: XCTestCase { // File output avoids pipe-buffer deadlocks while waiting for hdiutil. process.standardOutput = handle process.standardError = handle + let action = arguments.first ?? "unknown" + let started = ProcessInfo.processInfo.systemUptime + FileHandle.standardError.write(Data("Issue10 exFAT fixture: hdiutil \(action) started (\(scratch.lastPathComponent))\n".utf8)) try process.run() process.waitUntilExit() + let elapsed = ProcessInfo.processInfo.systemUptime - started + FileHandle.standardError.write(Data("Issue10 exFAT fixture: hdiutil \(action) exited \(process.terminationStatus) after \(String(format: "%.1f", elapsed))s\n".utf8)) guard process.terminationStatus == 0 else { let detail = (try? String(contentsOf: log, encoding: .utf8)) ?? "No output" throw NSError(domain: "Issue10Probe.hdiutil", code: Int(process.terminationStatus), diff --git a/test.sh b/test.sh index 73d8f582..e7fb36be 100755 --- a/test.sh +++ b/test.sh @@ -30,13 +30,18 @@ case "$JOB" in engine-test) # Keep independent disk fixtures from racing short setup deadlines. Each # test still exercises its own concurrent copy/verify workers. - # Match the Apple Silicon test host to the package's arm64 bundle. Newer - # Xcode hosts may otherwise choose arm64e and refuse to load XCTest. - if [[ "$(uname -m)" == arm64 ]]; then - arch -arm64 swift test --package-path "$ROOT/Packages/BitMatchEngine" --build-system native --no-parallel - else - swift test --package-path "$ROOT/Packages/BitMatchEngine" --build-system native --no-parallel - fi + # Xcode 27 can choose an arm64e host for a mixed SwiftPM test run and fail + # to load the package's arm64-only XCTest bundle, while Swift Testing still + # runs. Run each test framework explicitly so neither can be omitted. + run_engine_tests() { + if [[ "$(uname -m)" == arm64 ]]; then + arch -arm64 swift test --package-path "$ROOT/Packages/BitMatchEngine" --build-system native --no-parallel "$@" + else + swift test --package-path "$ROOT/Packages/BitMatchEngine" --build-system native --no-parallel "$@" + fi + } + run_engine_tests --disable-swift-testing + run_engine_tests --disable-xctest ;; release-builds) run_xcodebuild mac-release build -scheme BitMatch -configuration Release -destination 'platform=macOS'