Skip to content
Closed
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
27 changes: 27 additions & 0 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2822,6 +2822,9 @@ jobs:
env:
SELECTED_PACKAGES: ${{ steps.select.outputs.selected_packages }}
SELECTED_COUNT: ${{ steps.select.outputs.selected_count }}
# macOS 15 disables Swift's crash backtracer by default. Preserve
# a bounded symbolic stack in the log when a package runner dies.
SWIFT_BACKTRACE: "enable=yes,interactive=no,timeout=15s,symbolicate=fast,color=no"
run: |
set -euo pipefail
# The cmux-unit scheme only runs the cmuxTests app-host suite; it does
Expand Down Expand Up @@ -2927,6 +2930,30 @@ jobs:
echo "::endgroup::"
done < "$selected"

- name: Diagnose Settings UI package crash
if: ${{ failure() }}
continue-on-error: true
timeout-minutes: 3
run: |
set -euo pipefail
package="$PWD/Packages/macOS/CmuxSettingsUI"
bundle="$(find "$package/.build" -path '*/CmuxSettingsUIPackageTests.xctest/Contents/MacOS/CmuxSettingsUIPackageTests' -type f -print -quit)"
[ -n "$bundle" ] || exit 0
toolchain_usr="$(dirname "$(dirname "$(xcrun --find swift)")")"
helper="$RUNNER_TEMP/cmux-settings-testing-helper"
cp "$toolchain_usr/libexec/swift/pm/swiftpm-testing-helper" "$helper"
cat > "$RUNNER_TEMP/cmux-settings-debug.plist" <<'PLIST'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict><key>com.apple.security.get-task-allow</key><true/></dict></plist>
PLIST
codesign --force --sign - --entitlements "$RUNNER_TEMP/cmux-settings-debug.plist" "$helper"
python3 scripts/ci/run_with_timeout.py --timeout-seconds 120 -- \
xcrun lldb --batch \
-o 'settings set target.disable-aslr false' \
-o run -o 'thread backtrace all' \
-- "$helper" --test-bundle-path "$bundle" --testing-library swift-testing

# A package test runner that dies on a signal prints one line from
# SwiftPM ("Exited with unexpected signal code N") and nothing else: no
# faulting address, no thread, no frames. That is why the only tool this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Testing
@Suite(.serialized)
final class GlobalSearchShortcutSettingsModelTests {
@Test func distinctChordSuffixesCanShareAPrefix() async throws {
FileHandle.standardError.write(Data("global-search-chord: creating fixture\n".utf8))
let directory = try makeTemporaryDirectory()
defer { try? FileManager.default.removeItem(at: directory) }

Expand All @@ -24,6 +25,7 @@ final class GlobalSearchShortcutSettingsModelTests {
option: true,
control: true
)
FileHandle.standardError.write(Data("global-search-chord: fixture ready\n".utf8))
let settingsChord = StoredShortcut(
first: prefix,
second: ShortcutStroke(key: "p")
Expand All @@ -34,12 +36,15 @@ final class GlobalSearchShortcutSettingsModelTests {
)

await model.assignChord(settingsChord, to: .openSettings)
FileHandle.standardError.write(Data("global-search-chord: settings chord assigned\n".utf8))
await model.assignChord(searchChord, to: .globalSearch)
FileHandle.standardError.write(Data("global-search-chord: search chord assigned\n".utf8))

let bindings = await store.value(for: catalog.shortcuts.bindings)
#expect(bindings[ShortcutAction.openSettings.rawValue] == settingsChord)
#expect(bindings[ShortcutAction.globalSearch.rawValue] == searchChord)
#expect(model.conflictRejections[ShortcutAction.globalSearch.rawValue] == nil)
FileHandle.standardError.write(Data("global-search-chord: assertions complete\n".utf8))
}

@Test func persistedMediaKeyGlobalSearchBindingIsNotEffective() async throws {
Expand Down
Loading