Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/swift-file-length-budget.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
16001 Sources/ContentView.swift
14100 Sources/TerminalController.swift
12654 Sources/Workspace.swift
12215 cmuxTests/AppDelegateShortcutRoutingTests.swift
12219 cmuxTests/AppDelegateShortcutRoutingTests.swift
11827 Sources/GhosttyTerminalView.swift
11411 Sources/Panels/BrowserPanel.swift
9331 cmuxTests/CLINotifyProcessIntegrationRegressionTests.swift
Expand Down
8 changes: 6 additions & 2 deletions cmuxTests/AppDelegateShortcutRoutingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ final class AppDelegateShortcutRoutingTests: XCTestCase {
private static var retainedTextBoxRestoreViews: [TextBoxInputTextView] = []
private var savedShortcutsByAction: [KeyboardShortcutSettings.Action: StoredShortcut] = [:]
private var actionsWithPersistedShortcut: Set<KeyboardShortcutSettings.Action> = []
private var originalSettingsFileStore: KeyboardShortcutSettingsFileStore!
// Optional, not IUO: setUpWithError() can XCTSkip before this is assigned,
// and tearDown() still runs after a skip, so it must tolerate a nil here.
private var originalSettingsFileStore: KeyboardShortcutSettingsFileStore?

// TEMPORARY (2026-06-18): These tests drive real NSWindow key/focus state and
// assert that a shortcut routes to the *focused* window. On headless CI
Expand Down Expand Up @@ -291,7 +293,9 @@ final class AppDelegateShortcutRoutingTests: XCTestCase {
KeyboardShortcutSettings.shortcutLookupObserver = nil
TextBoxSubmit.debugResetForTesting()
#endif
KeyboardShortcutSettings.settingsFileStore = originalSettingsFileStore
if let originalSettingsFileStore {
KeyboardShortcutSettings.settingsFileStore = originalSettingsFileStore
}
AppDelegate.shared?.shortcutLayoutCharacterProvider = KeyboardLayout.character(forKeyCode:modifierFlags:)
AppDelegate.shared?.debugCloseMainWindowConfirmationHandler = nil
AppDelegate.shared?.debugCreateMainWindowSourceIsNativeFullScreenOverride = nil
Expand Down
14 changes: 14 additions & 0 deletions scripts/ci/xcodebuild_noninteractive.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@ def main() -> int:
except OSError:
pass

# Forward a fast, non-interactive Swift crash backtrace into the XCTest
# host process (cmux DEV.app). The crash that matters happens in the app
# host, not in xcodebuild, and the job-level SWIFT_BACKTRACE only reaches
# xcodebuild itself. xcodebuild copies TEST_RUNNER_-prefixed env vars (with
# the prefix stripped) into the test host's environment, so this is what
# actually makes an app-host crash backtrace cheap instead of an 80s+
# symbolicated, interactive hang that eats the CI budget.
os.environ.setdefault(
"TEST_RUNNER_SWIFT_BACKTRACE",
os.environ.get(
"SWIFT_BACKTRACE", "interactive=no,timeout=0s,symbolicate=off,color=no"
),
)

pid, fd = pty.fork()
if pid == 0:
try:
Expand Down
Loading