From 1b160dc5ca47bf86795dbe60b8579b58ed22a638 Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Sun, 1 Mar 2026 04:04:32 -0800 Subject: [PATCH] Add display diagnostics, test filter, and per-test timeout to Depot workflow (#720) - Display diagnostics step to debug headless display issues - test_filter input to run specific XCUITest classes - test_timeout input (default 120s) to prevent test hangs --- .github/workflows/test-depot.yml | 34 +++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-depot.yml b/.github/workflows/test-depot.yml index b63fe387..b1a04d53 100644 --- a/.github/workflows/test-depot.yml +++ b/.github/workflows/test-depot.yml @@ -17,6 +17,14 @@ on: required: false default: false type: boolean + test_filter: + description: "Run specific UI test class (e.g. UpdatePillUITests) or empty for all" + required: false + default: "" + test_timeout: + description: "Per-test timeout in seconds (default: 120)" + required: false + default: "120" jobs: tests: @@ -74,6 +82,18 @@ jobs: rm GhosttyKit.xcframework.tar.gz test -d GhosttyKit.xcframework + - name: Display diagnostics + run: | + echo "=== Screen resolution ===" + system_profiler SPDisplaysDataType 2>/dev/null || echo "No display info available" + echo "" + echo "=== Window server ===" + /usr/sbin/system_profiler SPSoftwareDataType | grep -i "boot mode" || true + echo "" + echo "=== Accessibility permissions ===" + tccutil reset Accessibility 2>/dev/null || true + echo "Accessibility reset attempted" + - name: Clean DerivedData run: | rm -rf ~/Library/Developer/Xcode/DerivedData/GhosttyTabs-* @@ -142,11 +162,23 @@ jobs: - name: Run UI tests if: ${{ !inputs.skip_ui_tests }} + env: + TEST_FILTER: ${{ inputs.test_filter }} + TEST_TIMEOUT: ${{ inputs.test_timeout || '120' }} run: | set -euo pipefail SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages" + + # Build the -only-testing argument + if [ -n "$TEST_FILTER" ]; then + ONLY_TESTING="-only-testing:cmuxUITests/$TEST_FILTER" + else + ONLY_TESTING="-only-testing:cmuxUITests" + fi + xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug \ -clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \ -disableAutomaticPackageResolution \ -destination "platform=macOS" \ - -only-testing:cmuxUITests test + -maximum-test-execution-time-allowance "$TEST_TIMEOUT" \ + $ONLY_TESTING test