Adds scripts/live-dbus-test.sh (`just live-dbus`): each scenario runs the installed Ghostty 1.3.1 and the Rust build on a private dbus-run-session bus inside a private headless weston (the user's session bus is never written to), with Python/Gio mocks for org.freedesktop.Notifications, the GlobalShortcuts/Settings portal and org.freedesktop.systemd1, plus a real xdg-desktop-portal run. Scenarios: single-instance (+detect), +new-window with arguments, notifications, global shortcuts, color-scheme settings, cgroup scope creation, URL opening. tests/live_dbus.rs compares the Rust build against goldens recorded from the original (skips when tools or a fresh production build are missing). Two Rust bugs found and fixed (no upstream deviation): - GlobalShortcuts CreateSession/BindShortcuts payloads used the wrong D-Bus signatures ((v), double-boxed values), which a real portal rejects; signature tests added. - CreateSession was sent twice at startup; the config is now bound only after the D-Bus connection is set, as in Zig. All nine scenarios now behave identically to the original (docs/rewrite/notes/live-dbus.md). Test Plan: - just live-dbus - cargo test --test live_dbus (needs target/vp/production/ghostty)
19 lines
867 B
Python
19 lines
867 B
Python
#!/usr/bin/env python3
|
|
"""Summarize the raw `cat -v` capture of child-theme.sh: per phase (split by
|
|
the `--- after` markers) the collapsed sequence of CSI ? 997 reports and the
|
|
last OSC 11 background answer."""
|
|
import re
|
|
import sys
|
|
|
|
text = open(sys.argv[1]).read()
|
|
parts = re.split(r"\n--- (after [^\n]*)\n", "\n" + text)
|
|
# parts: [startup, name1, body1, name2, body2, ...]; markers are written
|
|
# right before the action, so the body after a marker is its effect.
|
|
names = ["startup"] + parts[1::2]
|
|
chunks = [parts[0]] + parts[2::2]
|
|
for name, chunk in zip(names, chunks):
|
|
reports = re.findall(r"\^\[\[\?997;(\d)n", chunk)
|
|
collapsed = [r for i, r in enumerate(reports) if i == 0 or r != reports[i - 1]]
|
|
bgs = re.findall(r"\^\[\]11;(rgb:[0-9a-f/]+)\^G", chunk)
|
|
print(f"{name}: 997 reports={','.join(collapsed) or '-'} last bg={bgs[-1] if bgs else '-'}")
|