Files
CleanMM/scripts/atlas/full-acceptance.sh

74 lines
2.3 KiB
Bash
Raw Normal View History

2026-03-10 17:09:35 +08:00
#!/bin/bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "$0")/../.." && pwd)"
cd "$ROOT_DIR"
run_ui_acceptance() {
2026-03-11 08:42:41 +00:00
local atlas_log repro_log
atlas_log="$(mktemp -t atlas-ui-acceptance.XXXXXX.log)"
repro_log="$(mktemp -t atlas-ui-repro.XXXXXX.log)"
trap 'rm -f "$atlas_log" "$repro_log"' RETURN
if ./scripts/atlas/run-ui-automation.sh 2>&1 | tee "$atlas_log"; then
return 0
fi
echo "Atlas UI automation failed; checking standalone repro to classify the failure..."
if xcodebuild test \
-project Testing/XCUITestRepro/XCUITestRepro.xcodeproj \
-scheme XCUITestRepro \
-destination 'platform=macOS' 2>&1 | tee "$repro_log"; then
echo "Standalone repro passed while Atlas UI automation failed; treating this as an Atlas-specific blocker."
return 1
fi
if grep -q 'Timed out while enabling automation mode' "$atlas_log" && grep -q 'Timed out while enabling automation mode' "$repro_log"; then
echo "UI automation is blocked by the current macOS automation environment; continuing acceptance with a documented environment condition."
return 0
fi
echo "UI automation failed for a reason that was not classified as a shared environment blocker."
2026-03-10 17:09:35 +08:00
return 1
}
echo "[1/11] Shared package tests"
2026-03-10 17:09:35 +08:00
swift test --package-path Packages
echo "[2/11] App package tests"
2026-03-10 17:09:35 +08:00
swift test --package-path Apps
echo "[3/11] Worker and helper builds"
2026-03-10 17:09:35 +08:00
swift build --package-path XPC
swift test --package-path Helpers
swift build --package-path Testing
echo "[4/11] Fixture automation scripts"
bash -n ./scripts/atlas/smart-clean-manual-fixtures.sh
bash -n ./scripts/atlas/apps-manual-fixtures.sh
bash -n ./scripts/atlas/apps-evidence-acceptance.sh
echo "[5/11] Native packaging"
2026-03-10 17:09:35 +08:00
./scripts/atlas/package-native.sh
echo "[6/11] Bundle structure verification"
2026-03-10 17:09:35 +08:00
./scripts/atlas/verify-bundle-contents.sh
echo "[7/11] DMG install verification"
2026-03-10 17:09:35 +08:00
KEEP_INSTALLED_APP=1 ./scripts/atlas/verify-dmg-install.sh
echo "[8/11] Installed app launch smoke"
2026-03-10 17:09:35 +08:00
./scripts/atlas/verify-app-launch.sh
echo "[9/11] Native UI automation"
2026-03-10 17:09:35 +08:00
run_ui_acceptance
echo "[10/11] Signing preflight"
2026-03-10 17:09:35 +08:00
./scripts/atlas/signing-preflight.sh || true
echo "[11/11] Acceptance summary"
2026-03-10 17:09:35 +08:00
echo "Artifacts available in dist/native"
ls -lah dist/native