Integration tests that need something task test (shellcheck/bats/bash -n)
can't give us: a real installed terminal package, a real ps build, a real
(if fresh) dconf/D-Bus session. Every suite here runs entirely inside
disposable containers and never touches the host — see "Why Docker, never
the host" below before changing anything in here.
# everything
bash tests/docker/run-all.sh
# one suite
bash tests/docker/run-ps-compat.sh
bash tests/docker/run-gtk-terminals.sh
bash tests/docker/run-file-terminals.shNeeds Docker. Not wired into task test or CI -- these are slower (image
builds, apt-get install) and Docker may not be available everywhere task test runs. Run them by hand after touching apply-colors.sh/gogh.sh,
especially anything to do with ps, dconf/gsettings, or a specific
terminal's config file.
run-ps-compat.sh-- theps -o comm=/ps -o ppid=calls used to auto-detectTERMINALwhen it isn't already set, across procps-ng 3.3.17 (Debian bullseye), 4.0.2 (bookworm), and Alpine's procps-ng build. Regression-tests the ppid= trim fix specifically (confirmed it reproducibly breaks with "error: improper list" without the trim, on all three).run-gtk-terminals.sh-- GNOME Terminal, MATE Terminal, Tilix, and Guake, the realapply-colors.shend to end (viainstalls/dracula.sh, the same contract a real install uses) against their real, installed gsettings schemas, in a freshdbus-run-session. This is what caught the MATE-specific bug below. Guake writes straight intoguake.style.font(no profile list, so no schema-default gap to hit) and gets its own check for that reason.run-file-terminals.sh-- xfce4-terminal, foot, Konsole, kitty, kmscon, Termux, Linux vt, mintty, Alacritty, Terminator, and Ghostty's config-writing logic. Also the real end-to-end path, checking the written config file contains the expected color. Alacritty is checked twice: from scratch, and over a config with color tables that must get commented out. Terminator is checked from scratch and over the minimal config it creates on first launch; the from-scratch case is what caught the Terminator bug below. Ghostty isn't an Ubuntu 24.04 apt package, butapply_ghosttyonly writes a file, so it's testable without it.
- Wezterm -- applies colors via runtime OSC escape sequences, no config file at all. Nothing to assert against without a live PTY reading them; at most this could check the generated escape sequence string matches what's expected, without Wezterm installed.
- Pantheon/elementary terminal -- gsettings-based, but its schema isn't realistically installable outside actual elementary OS.
- iTerm2 (
apply_darwin) -- macOS-only, can't run under Linux Docker at all. - Cygwin/mintty's own
$OSdetection -- Windows/Cygwin-only; the underlying config-writing logic (apply_cygwin/updateMinttyConfig) is tested directly inrun-file-terminals.shwithTERMINAL=minttyset explicitly, bypassing OS auto-detection.
All already fixed, kept here as the reason this exists:
- MATE Terminal false "no saved profiles found."
apply_gtk()had its own pre-flight check (dconf list "${BASE_DIR%:}"non-empty) separate from theDEFAULT_SLUGgsettings fallback fix from #351/#386/#552. It happened to keep working for GNOME Terminal and Tilix only because theirPROFILE_LIST_KEYis a direct child ofBASE_DIR(seeding the list incidentally populated it) -- MATE'sPROFILE_LIST_KEYlives under a sibling.../global/subtree instead, so the exact fresh-install case the other fix resolved still failed this second, redundant check. Fixed by checkingDEFAULT_SLUGdirectly instead of re-deriving profile existence from a terminal-specific path. - Konsole silently wrote nothing on a fresh system.
apply_konsole()never created~/.local/share/konsole/before writing into it --touch/echofailed silently (noset -ein this codebase) and the script still exited 0, so a user would see no error and no theme. Fixed with amkdir --parentsbefore the first write. - Terminator crashed on a fresh config (in the Python helper
apply-terminator.py, since replaced by Bash inapply-colors.sh). Itsbackup_conf()unconditionallyshutil.copyfile()s the existing config to make a backup, butConfigObjdoesn't require that file to already exist -- so a Terminator that had never been launched before (no~/.config/terminator/configyet) crashed with an unhandledFileNotFoundErrorinstead of writing the theme. Fixed by skipping the backup when there's nothing to back up yet.
Earlier in this project's history, a test that tried to isolate a dconf write via XDG_CONFIG_HOME and separately via dbus-run-session on the
host -- both leaked the write into the real, live desktop session and
modified real user data. There is no known way to sandbox a dconf write outside a container or VM on Linux. Every suite in this directory
runs the risky parts (anything that can invoke dconf write/gsettings set, or that depends on a specific ps/package build) inside a
docker run --rm container, never directly on whatever machine is
running these tests.