GNOME test suite (GN1-GN7), KDE-unchanged block, runner support for the GNOME VM; remove the Go refactor's backend suite and golden sandbox
Sync git.upriser.nl mirror / sync (push) Skipped

This commit is contained in:
theupriser committed 2026-10-15 10:51:41 +02:00
1 parent ccbc5ec59e
commit 450a5ee2ec
59 files changed
+256 -189

No files matched your search

-1
View File
@@ -36,4 +36,3 @@ share/*
*.tmp *.tmp
host-keys.pub host-keys.pub
__pycache__/ __pycache__/
!share/golden/
+3
View File
@@ -6,6 +6,9 @@ of the history.
## Unreleased ## Unreleased
- **feat: suite `gnome`** (`share/vmtest/gnome/`, GN1-GN7) on the GNOME + GDM VM (`vmsuite.sh gnome`, base image from `~/vms/gnome-vm`, port 2307); `vmsuite.sh` starts GDM/GNOME instead of Plasma for it; `prelude.sh` reads the running desktop and loads the GNOME libs; `vmtest.sh` runs it by default. New KDE block `cli/70-k1-kde-unchanged.sh`
- **chore: removed `share/vmtest/backend` and `share/golden/`** (safety nets of the scrapped Go refactor)
- **feat: `share/golden/`: a no-VM sandbox (bubblewrap, fake `/etc` `/sys` `$HOME`, shim `pacman` `systemctl` `sudo` `uname` `modinfo`) and golden `--backend status` and apply `plan` output of the bash 2.11.1 backend for an AMD PC, an NVIDIA PC and a Steam Machine; `record.sh` records, `record.sh check` compares (the Go refactor's safety net)** - **feat: `share/golden/`: a no-VM sandbox (bubblewrap, fake `/etc` `/sys` `$HOME`, shim `pacman` `systemctl` `sudo` `uname` `modinfo`) and golden `--backend status` and apply `plan` output of the bash 2.11.1 backend for an AMD PC, an NVIDIA PC and a Steam Machine; `record.sh` records, `record.sh check` compares (the Go refactor's safety net)**
## 0.5.0 - 2026-10-02 ## 0.5.0 - 2026-10-02
+17
View File
@@ -64,6 +64,22 @@ change only shows right after Enter).
## F. Features per release ## F. Features per release
### F-GNOME. Steamify on GNOME/GDM (`feature/gnome-prototype`; suite `gnome` on `~/vms/gnome-vm`, plain CachyOS + GNOME + GDM, no Steamify)
`scripts/vmsuite.sh gnome` (also part of `vmtest.sh`). KDE regression for it: cli block `70-k1-kde-unchanged.sh`.
| # | Block | Expect |
|---|---|---|
| GN1 | `10-n1-menu.sh` | GDM and GNOME detected; GNOME theme offered; Plasma theme and single user mode hidden (menu and `--backend status`) |
| GN2 | `20-n2-conversion.sh` | `custom.conf` autologin, AccountsService `Session`/`XSession`, GDM-aware session tools (CachyOS's kept as `.bak-steamify`), pacman hook, sudoers rule, GNOME packages, launcher entry, shellcheck, second apply changes nothing |
| GN3 | `30-n3-turn-off.sh` | `custom.conf` and CachyOS's tools exactly as before; hook, sudoers rule, helper gone; GDM stays |
| GN4 | `40-n4-theme.sh` | dark style, accent, wallpaper, buttons, GTK4 colors, extensions; off restores every value |
| GN5 | `50-n5-desktop-pref.sh` | `--desktop kde\|gnome\|last` stored, bad values refused, the session tool resolves to what is installed |
| GN6 | `60-n6-switch-reboot.host.sh` | stand-in gamescope session: boot into it, Switch to Desktop, Return to Gaming Mode, boot into desktop and back across reboots, pacman hook restores our tools |
| GN7 | `70-n7-both-desktops.sh` | with Plasma installed too: GDM kept, both themes offered, preferred/last desktop picks the session |
Not automatable: gamescope itself (no rendering in the VM), the app's dock icon and window frame, the Settings panel, real hardware (GDM restart behaviour).
### F2.12.0 The SteamOS conversion on NVIDIA (`release/2.12.0`; suite `nvidia`, fake NVIDIA PC) ### F2.12.0 The SteamOS conversion on NVIDIA (`release/2.12.0`; suite `nvidia`, fake NVIDIA PC)
Since 2.12.0 "Gaming on NVIDIA" (Steam on the desktop) is replaced by the SteamOS conversion with a patched gamescope Since 2.12.0 "Gaming on NVIDIA" (Steam on the desktop) is replaced by the SteamOS conversion with a patched gamescope
@@ -178,3 +194,4 @@ and started with `--fremont`. Automated: `scripts/vmtest.sh` (see the vm-install
| 2026-10-14 | Steamify `release/2.12.0` (dc189dc), plain CachyOS VM `~/vms/steamify-vm` (new ssh key: the old throwaway one was gone, authorized in the `ssh-ready` snapshot), dev `main` + the new nvidia suite; on the laptop (Ubuntu, KVM), headless | cli, menu, hw, installer, toggles, nvidia (N1, G1, N2-N5 rewritten for 2.12.0); boot loaders and the plain-PC install check not run (need the Steamify ISO) | **292 pass, 0 fail** (cli 65, menu 37, hw 78, installer 4, toggles 42, nvidia 66). Before the rewrite the old nvidia suite failed 8 checks, all because "Gaming on NVIDIA" is gone in 2.12.0. Test side: gamescope's smoke test needs a Vulkan device, so the VM gets `vulkan-swrast`; after a reboot the same gamescope fails with `vkAllocateMemory failed (-2)` on lavapipe in this VM (before the reboot it passes), so the offline-reinstall check runs before the reboot. Not seen on real hardware yet (N6) | | 2026-10-14 | Steamify `release/2.12.0` (dc189dc), plain CachyOS VM `~/vms/steamify-vm` (new ssh key: the old throwaway one was gone, authorized in the `ssh-ready` snapshot), dev `main` + the new nvidia suite; on the laptop (Ubuntu, KVM), headless | cli, menu, hw, installer, toggles, nvidia (N1, G1, N2-N5 rewritten for 2.12.0); boot loaders and the plain-PC install check not run (need the Steamify ISO) | **292 pass, 0 fail** (cli 65, menu 37, hw 78, installer 4, toggles 42, nvidia 66). Before the rewrite the old nvidia suite failed 8 checks, all because "Gaming on NVIDIA" is gone in 2.12.0. Test side: gamescope's smoke test needs a Vulkan device, so the VM gets `vulkan-swrast`; after a reboot the same gamescope fails with `vkAllocateMemory failed (-2)` on lavapipe in this VM (before the reboot it passes), so the offline-reinstall check runs before the reboot. Not seen on real hardware yet (N6) |
| 2026-10-14 | Steamify 2.12.0 on the ISO `steamify-cachyos-2.12.0-dev-261014-x86_64.iso` (sha256 `bd93fa6b…ed47c`, built from `release/2.12.0`), dev `main` (7dd1f37); on the laptop (Ubuntu, KVM), headless | B1-B5 for limine, systemd-boot and grub; the plain-PC install check (generic) for all three | boot loaders: **limine 43, systemd-boot 42, grub 42 pass, 0 fail**. Plain PC: 21-22 pass, **1 fail per loader: "cec is on, but this is not a Steam Machine"**. Cause: `steamify-install` falls back to "everything on" (`...,vram,cec,machine,poweroff`) when Calamares passes no selection (the headless test install), and `cec` is offered on every PC; `poweroff` stays off by itself (`machine_available`). The docs say HDMI-CEC is ticked by default only on a Steam Machine: either the ISO's fallback should only include `cec` on a Steam Machine, or this check should not expect it off. To decide; a real install through the chooser is not affected by the fallback. Test side: three parallel first installs corrupted the shared package cache (`could not rename ... .part`): install one VM first to fill `~/vms/pkg-cache`; a first retry also hit a transient "cachyos: signature ... is invalid" from a mirror. Laptop needs a `bsdtar` shim (pycdlib) and `VM_SSH_KEY` outside `~/.ssh` | | 2026-10-14 | Steamify 2.12.0 on the ISO `steamify-cachyos-2.12.0-dev-261014-x86_64.iso` (sha256 `bd93fa6b…ed47c`, built from `release/2.12.0`), dev `main` (7dd1f37); on the laptop (Ubuntu, KVM), headless | B1-B5 for limine, systemd-boot and grub; the plain-PC install check (generic) for all three | boot loaders: **limine 43, systemd-boot 42, grub 42 pass, 0 fail**. Plain PC: 21-22 pass, **1 fail per loader: "cec is on, but this is not a Steam Machine"**. Cause: `steamify-install` falls back to "everything on" (`...,vram,cec,machine,poweroff`) when Calamares passes no selection (the headless test install), and `cec` is offered on every PC; `poweroff` stays off by itself (`machine_available`). The docs say HDMI-CEC is ticked by default only on a Steam Machine: either the ISO's fallback should only include `cec` on a Steam Machine, or this check should not expect it off. To decide; a real install through the chooser is not affected by the fallback. Test side: three parallel first installs corrupted the shared package cache (`could not rename ... .part`): install one VM first to fill `~/vms/pkg-cache`; a first retry also hit a transient "cachyos: signature ... is invalid" from a mirror. Laptop needs a `bsdtar` shim (pycdlib) and `VM_SSH_KEY` outside `~/.ssh` |
| 2026-10-14 | Steamify 2.12.0 on the rebuilt ISO `steamify-cachyos-2.12.0-dev-261014-x86_64.iso` (the ISO repo's PR #26 merged: the install fallback only turns HDMI-CEC on for a Steam Machine), dev `main` (7e11b94); laptop, headless | B1-B5 for limine, systemd-boot, grub; the plain-PC install check for all three | **boot loaders: limine 43, systemd-boot 42, grub 42; plain PC: limine 23, systemd-boot 22, grub 22: all pass, 0 fail.** The earlier "cec is on, but this is not a Steam Machine" is fixed. (The limine boot line in the summary says "aborted" only because its VM already existed from the first run of the same ISO; its 43 passed.) Test side: six parallel installs of a newly released kernel corrupted the shared package cache (`linux-cachyos ... corrupted (PGP signature)`): delete the new files from `~/vms/pkg-cache/pkg`, install one VM first, then the rest | | 2026-10-14 | Steamify 2.12.0 on the rebuilt ISO `steamify-cachyos-2.12.0-dev-261014-x86_64.iso` (the ISO repo's PR #26 merged: the install fallback only turns HDMI-CEC on for a Steam Machine), dev `main` (7e11b94); laptop, headless | B1-B5 for limine, systemd-boot, grub; the plain-PC install check for all three | **boot loaders: limine 43, systemd-boot 42, grub 42; plain PC: limine 23, systemd-boot 22, grub 22: all pass, 0 fail.** The earlier "cec is on, but this is not a Steam Machine" is fixed. (The limine boot line in the summary says "aborted" only because its VM already existed from the first run of the same ISO; its 43 passed.) Test side: six parallel installs of a newly released kernel corrupted the shared package cache (`linux-cachyos ... corrupted (PGP signature)`): delete the new files from `~/vms/pkg-cache/pkg`, install one VM first, then the rest |
| 2026-10-15 | Steamify `feature/gnome-prototype` (dbaeaa1, from 2.12.0), plain CachyOS VM `~/vms/steamify-vm` and the new GNOME VM `~/vms/gnome-vm`, dev `main` + the `gnome` suite; laptop, headless | KDE regression: cli (+ new block 70-k1), menu, hw, installer, toggles, nvidia. GNOME: GN1-GN7 | **KDE: cli 89, hw 78, menu 37, installer 4, nvidia 66, toggles 42: 0 fail.** **GNOME: 0 fail** (first run 110 pass, 5 fail, all test bugs: shellcheck needs `-S warning -e SC2034,SC2154`, the VM's GDM already had autologin, a sed range cut the function out; GN2, GN3, GN5 re-run: 32, 11, 8 pass; GN1, GN4, GN6, GN7 passed first time). The Go-only `backend` suite and `share/golden` were removed (the Go refactor is scrapped). Not run: boot loaders, app screens U1-U9, real hardware |
+6 -3
View File
@@ -1,5 +1,8 @@
# Steamify on GNOME (GDM): prototype plan # Steamify on GNOME (GDM): prototype plan
## Test status 2026-10-15
Automated suite `gnome` (`scripts/vmsuite.sh gnome`, TESTPLAN F-GNOME, GN1-GN7): all pass, including session switching with the stand-in session, reboot persistence, boot into desktop, KDE+GNOME together. KDE regression (6 suites) passes on the branch. Open item (6) of the list below (GNOME regression run) is done; the rest stands.
## RESUME HERE (written 2026-10-14, end of the first session) ## RESUME HERE (written 2026-10-14, end of the first session)
State: product branch `feature/gnome-prototype` in steamify-cachyos (pushed, not merged; main is the 2.12.0 release), the theme repo State: product branch `feature/gnome-prototype` in steamify-cachyos (pushed, not merged; main is the 2.12.0 release), the theme repo
`github.com/theupriser/steamify-gnome-theme` (main). Everything is committed; the VM image is NOT in git (it lived in ~/vms/gnome-vm on one laptop). `github.com/theupriser/steamify-gnome-theme` (main). Everything is committed; the VM image is NOT in git (it lived in ~/vms/gnome-vm on one laptop).
@@ -51,9 +54,9 @@ plus pacman hook, relogin by restarting gdm).
3. [x] Check: custom.conf, AccountsService, hook, sudoers, our tools in place. 3. [x] Check: custom.conf, AccountsService, hook, sudoers, our tools in place.
4. [x] (gamescope itself dies in the VM: Vulkan/DRM scanout errors, also without GNOME; GDM did start it) Reboot: GDM autologs into the gamescope session (loginctl session desktop/type; gamescope may not render in the VM, a running session is enough). 4. [x] (gamescope itself dies in the VM: Vulkan/DRM scanout errors, also without GNOME; GDM did start it) Reboot: GDM autologs into the gamescope session (loginctl session desktop/type; gamescope may not render in the VM, a running session is enough).
5. [~] (gamescope->GNOME and GNOME->gamescope verified with a stand-in gamescope session (Exec=sleep infinity in /usr/share/wayland-sessions/gamescope-session.desktop, original kept as .real); reboot persistence, `boot` option and the shortcut click not yet) `steamos-session-select desktop` -> GNOME session; Return to Gaming Mode shortcut -> gamescope again; reboot persistence; `boot` option. 5. [~] (gamescope->GNOME and GNOME->gamescope verified with a stand-in gamescope session (Exec=sleep infinity in /usr/share/wayland-sessions/gamescope-session.desktop, original kept as .real); reboot persistence, `boot` option and the shortcut click not yet) `steamos-session-select desktop` -> GNOME session; Return to Gaming Mode shortcut -> gamescope again; reboot persistence; `boot` option.
6. [ ] Turn off: everything restored (custom.conf backup, original tools). 6. [x] (suite gnome GN3, 2026-10-15) Turn off: everything restored (custom.conf backup, original tools).
7. [ ] KDE regression: existing suites still pass on the KDE VM. 7. [x] (2026-10-15, laptop: cli, menu, hw, installer, toggles, nvidia, 0 fail) KDE regression: existing suites still pass on the KDE VM.
8. [ ] Commit dev-repo changes (VM_DESKTOP) to main; product branch stays a prototype, no release without the user. 8. [x] (with the gnome suite, 2026-10-15) Commit dev-repo changes (VM_DESKTOP) to main; product branch stays a prototype, no release without the user.
## Later (solid version) ## Later (solid version)
- Tests: GNOME suite in the dev repo, TESTPLAN rows; ISO with a GNOME variant. - Tests: GNOME suite in the dev repo, TESTPLAN rows; ISO with a GNOME variant.
+19 -6
View File
@@ -2,7 +2,8 @@
# One suite of the automated test (TESTPLAN.md rows that need no person) on the plain CachyOS VM # One suite of the automated test (TESTPLAN.md rows that need no person) on the plain CachyOS VM
# (Plasma, no Steamify: ~/vms/steamify-vm, from vminstall.sh --iso <CachyOS ISO> with VM_STEAMIFY=skip). # (Plasma, no Steamify: ~/vms/steamify-vm, from vminstall.sh --iso <CachyOS ISO> with VM_STEAMIFY=skip).
# scripts/vmsuite.sh <suite> [--window] suites: the folders in share/vmtest/ (cli, ...) # scripts/vmsuite.sh <suite> [--window] suites: the folders in share/vmtest/ (cli, ...)
# scripts/vmsuite.sh --prepare only make the base image (below) # scripts/vmsuite.sh --prepare [gnome] only make the base image (below)
# The suite "gnome" runs on the plain CachyOS + GNOME + GDM VM (~/vms/gnome-vm, from vminstall.sh with VM_DESKTOP=gnome) instead.
# Every block share/vmtest/<suite>/NN-name.sh starts from a fresh copy of the VM's `ssh-ready` state, # Every block share/vmtest/<suite>/NN-name.sh starts from a fresh copy of the VM's `ssh-ready` state,
# runs in the guest as the VM user (repo on /mnt; NN-name.host.sh blocks run on the host instead: reboots, # runs in the guest as the VM user (repo on /mnt; NN-name.host.sh blocks run on the host instead: reboots,
# host scripts), and prints PASS/FAIL/SKIP lines; the first comment lines say which TESTPLAN rows it # host scripts), and prints PASS/FAIL/SKIP lines; the first comment lines say which TESTPLAN rows it
@@ -15,7 +16,8 @@
set -uo pipefail set -uo pipefail
here="$(cd "$(dirname "$0")" && pwd)" here="$(cd "$(dirname "$0")" && pwd)"
repo="$(cd "$here/.." && pwd)" repo="$(cd "$here/.." && pwd)"
src="${SRC:-$HOME/vms/steamify-vm}" desk=kde; [[ "${1:-}" == gnome* || "${2:-}" == gnome* ]] && desk=gnome
src="${SRC:-$HOME/vms/steamify-vm}"; [[ $desk == gnome ]] && src="${SRC:-$HOME/vms/gnome-vm}"
base="$src/base-ssh-ready.qcow2" base="$src/base-ssh-ready.qcow2"
prepare_base() { # once, under a lock (parallel suites): the ssh-ready snapshot as a stand-alone image prepare_base() { # once, under a lock (parallel suites): the ssh-ready snapshot as a stand-alone image
@@ -32,7 +34,7 @@ suite="${1:?usage: $0 <suite> [--window] | --prepare}"
[[ "${2:-}" == --window ]] || export VM_HEADLESS=1 [[ "${2:-}" == --window ]] || export VM_HEADLESS=1
dir="$repo/share/vmtest/$suite" dir="$repo/share/vmtest/$suite"
[[ -d "$dir" ]] || { echo "No suite $suite (folders in share/vmtest/)" >&2; exit 2; } [[ -d "$dir" ]] || { echo "No suite $suite (folders in share/vmtest/)" >&2; exit 2; }
case "$suite" in cli) port=2301 ;; menu) port=2302 ;; hw) port=2303 ;; installer) port=2304 ;; toggles) port=2305 ;; nvidia) port=2306 ;; *) port=2390 ;; esac case "$suite" in gnome*) port=2307 ;; cli) port=2301 ;; menu) port=2302 ;; hw) port=2303 ;; installer) port=2304 ;; toggles) port=2305 ;; nvidia) port=2306 ;; *) port=2390 ;; esac
export VM_PORT="${VM_PORT:-$port}" export VM_PORT="${VM_PORT:-$port}"
export VM_DIR="$HOME/vms/run-$suite" export VM_DIR="$HOME/vms/run-$suite"
export REPO="${REPO:-$repo/../steamify-cachyos}" export REPO="${REPO:-$repo/../steamify-cachyos}"
@@ -59,16 +61,23 @@ vm_fresh() { # vm_fresh [VAR=value...]: extra environment for the VM start (BI
cp "$repo/run.sh" "$VM_DIR/run.sh"; cp "$src/vars.ssh-ready.fd" "$VM_DIR/vars.fd" cp "$repo/run.sh" "$VM_DIR/run.sh"; cp "$src/vars.ssh-ready.fd" "$VM_DIR/vars.fd"
rm -f "$VM_DIR/disk.qcow2" "$VM_DIR/known_hosts" rm -f "$VM_DIR/disk.qcow2" "$VM_DIR/known_hosts"
qemu-img create -q -f qcow2 -b "$base" -F qcow2 "$VM_DIR/disk.qcow2" || return 1 qemu-img create -q -f qcow2 -b "$base" -F qcow2 "$VM_DIR/disk.qcow2" || return 1
(cd "$VM_DIR" && env "$@" nohup ./run.sh --fremont > vm.log 2>&1 &) local fremont=--fremont; [[ $desk == gnome ]] && fremont= # GNOME: a plain PC
(cd "$VM_DIR" && env "$@" nohup ./run.sh $fremont > vm.log 2>&1 &)
local _; for _ in $(seq 100); do vm_ssh -o ConnectTimeout=3 true 2>/dev/null && break; sleep 3; done local _; for _ in $(seq 100); do vm_ssh -o ConnectTimeout=3 true 2>/dev/null && break; sleep 3; done
vm_ssh -o LogLevel=ERROR bash -s <<'REMOTE' vm_ssh -o LogLevel=ERROR "DESK=$desk bash -s" <<'REMOTE'
sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt
if [[ $DESK == kde ]]; then
sudo mkdir -p /etc/plasmalogin.conf.d sudo mkdir -p /etc/plasmalogin.conf.d
printf '[Autologin]\nUser=%s\nSession=plasma.desktop\n' "$USER" | sudo tee /etc/plasmalogin.conf.d/00-test-autologin.conf >/dev/null printf '[Autologin]\nUser=%s\nSession=plasma.desktop\n' "$USER" | sudo tee /etc/plasmalogin.conf.d/00-test-autologin.conf >/dev/null
for _ in $(seq 10); do pgrep -u "$USER" -x plasmashell >/dev/null && break; sleep 3; done for _ in $(seq 10); do pgrep -u "$USER" -x plasmashell >/dev/null && break; sleep 3; done
pgrep -u "$USER" -x plasmashell >/dev/null || { sudo systemctl reset-failed plasmalogin; sudo systemctl restart plasmalogin; } pgrep -u "$USER" -x plasmashell >/dev/null || { sudo systemctl reset-failed plasmalogin; sudo systemctl restart plasmalogin; }
for _ in $(seq 40); do pgrep -u "$USER" -x plasmashell >/dev/null && break; sleep 3; done for _ in $(seq 40); do pgrep -u "$USER" -x plasmashell >/dev/null && break; sleep 3; done
pkill -u "$USER" systemsettings; pkill -u "$USER" cachyos-hello pkill -u "$USER" systemsettings; pkill -u "$USER" cachyos-hello
else
# GNOME: the VM's GDM autologs in (vminstall.sh); wait for the shell.
for _ in $(seq 60); do pgrep -u "$USER" -x gnome-shell >/dev/null && break; sleep 3; done
pgrep -u "$USER" -x gnome-shell >/dev/null || { sudo systemctl restart gdm; for _ in $(seq 40); do pgrep -u "$USER" -x gnome-shell >/dev/null && break; sleep 3; done; }
fi
for f in /etc/pacman.d/*mirrorlist*; do sudo sed -i '/krfoss/s/^Server/#Server/' "$f"; done for f in /etc/pacman.d/*mirrorlist*; do sudo sed -i '/krfoss/s/^Server/#Server/' "$f"; done
# the host's package cache over pacman's # the host's package cache over pacman's
sudo mkdir -p /var/cache/steamify-pkg sudo mkdir -p /var/cache/steamify-pkg
@@ -77,7 +86,11 @@ if sudo mount -t 9p -o trans=virtio,version=9p2000.L cache /var/cache/steamify-p
# Steamify's own downloads (the CEC driver: GitHub rate-limits it) once for every VM # Steamify's own downloads (the CEC driver: GitHub rate-limits it) once for every VM
sudo mkdir -p /var/cache/steamify-pkg/steamify /var/cache/steamify; sudo mount --bind /var/cache/steamify-pkg/steamify /var/cache/steamify sudo mkdir -p /var/cache/steamify-pkg/steamify /var/cache/steamify; sudo mount --bind /var/cache/steamify-pkg/steamify /var/cache/steamify
fi fi
pgrep -u "$USER" -x plasmashell >/dev/null && echo "Logged in to Plasma." || { echo "Plasma did not start." >&2; exit 1; } if [[ $DESK == kde ]]; then
pgrep -u "$USER" -x plasmashell >/dev/null && echo "Logged in to Plasma." || { echo "Plasma did not start." >&2; exit 1; }
else
pgrep -u "$USER" -x gnome-shell >/dev/null && echo "Logged in to GNOME." || { echo "GNOME did not start." >&2; exit 1; }
fi
REMOTE REMOTE
} }
+4 -4
View File
@@ -6,7 +6,7 @@
# boot the boot loader test (limine, systemd-boot, grub), or name loaders # boot the boot loader test (limine, systemd-boot, grub), or name loaders
# generic the plain-PC install check for every loader (vmbootloadertest.sh --quick --generic: a PC that is not a # generic the plain-PC install check for every loader (vmbootloadertest.sh --quick --generic: a PC that is not a
# Steam Machine must get no Steam Machine items and no DKMS modules); part of the default run # Steam Machine must get no Steam Machine items and no DKMS modules); part of the default run
# <suite> cli, menu, hw, installer, toggles, nvidia (folders in share/vmtest/) # <suite> cli, menu, hw, installer, toggles, nvidia, gnome (folders in share/vmtest/)
# --install install the boot loader VMs first from the newest Steamify ISO (asks before replacing a disk) # --install install the boot loader VMs first from the newest Steamify ISO (asks before replacing a disk)
# --window show the VMs' windows (default: headless; one shared Konsole follows ~/vms/test.log) # --window show the VMs' windows (default: headless; one shared Konsole follows ~/vms/test.log)
# MAX_PARALLEL=3 (env) VMs at once (5 worked on a 9800X3D / 64 GB); the slowest suites start first # MAX_PARALLEL=3 (env) VMs at once (5 worked on a 9800X3D / 64 GB); the slowest suites start first
@@ -42,7 +42,7 @@ if $screen; then
fi fi
if [[ ${#loaders[@]} -eq 0 && ${#suites[@]} -eq 0 ]] && ! $want_boot && ! $want_generic; then if [[ ${#loaders[@]} -eq 0 && ${#suites[@]} -eq 0 ]] && ! $want_boot && ! $want_generic; then
want_boot=true; want_generic=true want_boot=true; want_generic=true
for d in cli menu hw installer toggles nvidia; do [[ -d "$repo/share/vmtest/$d" ]] && suites+=("$d"); done for d in cli menu hw installer toggles nvidia gnome; do [[ -d "$repo/share/vmtest/$d" ]] && suites+=("$d"); done
fi fi
# What the ISO advertises: the boot loaders calamares-online.sh keeps. # What the ISO advertises: the boot loaders calamares-online.sh keeps.
advertised="$(sed -n 's/.*"bootloader:\([^"]*\)".*/\1/p' "$iso_repo/archiso/airootfs/usr/local/bin/calamares-online.sh" 2>/dev/null | head -n 1)" advertised="$(sed -n 's/.*"bootloader:\([^"]*\)".*/\1/p' "$iso_repo/archiso/airootfs/usr/local/bin/calamares-online.sh" 2>/dev/null | head -n 1)"
@@ -55,8 +55,8 @@ summary="$HOME/vms/last-test.txt"
maxp="${MAX_PARALLEL:-3}" # VMs at once (4 GB RAM each in the suites, see vmsuite.sh); 5 ran fine on a 9800X3D with 64 GB maxp="${MAX_PARALLEL:-3}" # VMs at once (4 GB RAM each in the suites, see vmsuite.sh); 5 ran fine on a 9800X3D with 64 GB
# Jobs, the slowest first so the last ones are short: suites, then the boot loaders. # Jobs, the slowest first so the last ones are short: suites, then the boot loaders.
jobs_list=() jobs_list=()
for s in toggles hw cli menu installer; do [[ " ${suites[*]} " == *" $s "* ]] && jobs_list+=("suite:$s"); done for s in gnome toggles hw cli menu installer; do [[ " ${suites[*]} " == *" $s "* ]] && jobs_list+=("suite:$s"); done
for s in "${suites[@]}"; do [[ " toggles hw cli menu installer " == *" $s "* ]] || jobs_list+=("suite:$s"); done for s in "${suites[@]}"; do [[ " gnome toggles hw cli menu installer " == *" $s "* ]] || jobs_list+=("suite:$s"); done
for l in "${loaders[@]}"; do jobs_list+=("loader:$l"); done for l in "${loaders[@]}"; do jobs_list+=("loader:$l"); done
for l in "${gloaders[@]}"; do jobs_list+=("generic:$l"); done for l in "${gloaders[@]}"; do jobs_list+=("generic:$l"); done
jobtag() { [[ "${1%%:*}" == generic ]] && echo "${1#*:}-generic" || echo "${1#*:}"; } # files and names of a job jobtag() { [[ "${1%%:*}" == generic ]] && echo "${1#*:}-generic" || echo "${1#*:}"; } # files and names of a job
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":["gaming","boot"]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":["gaming"]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":[]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":[]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":[]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":["gaming","single"]}
-1
View File
@@ -1 +0,0 @@
{"version":"2.12.0","firstRun":true,"steamMachine":false,"kernel":"7.0.0-fixture-cachyos","pinnedKernel":"7.1.6-1","cecDevices":"","leds":0,"bios":null,"items":[{"id":"gaming","label":"SteamOS conversion","hint":"boot into gaming mode, Steam on the desktop","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"boot","label":"Boot into the desktop instead of gaming mode","hint":"","kind":"choice","parent":"gaming","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"silent","label":"Start Steam silently in desktop mode","hint":"in the tray at login on the desktop, no window","kind":"toggle","parent":"gaming","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"glyphs","label":"Install Steam Deck/Machine icons","hint":"Deck button icons in gaming mode","kind":"toggle","parent":"gaming","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"theme","label":"Install SteamOS theme","hint":"Vapor look (cachyos-vapor)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"single","label":"Single user mode","hint":"no password, lock screen or log out (SDDM)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"launcher","label":"Steamify shortcut","hint":"the app on the desktop, Steamify Terminal in the launcher","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"notify","label":"Update notifications","hint":"a notification when there's a new Steamify, never updates by itself","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"extended_controller_support","label":"Extended controller support","hint":"Xbox wireless dongle (xone), Xbox controllers over Bluetooth (xpadneo)","kind":"toggle","parent":"","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"cec","label":"HDMI-CEC","hint":"use Steam with the TV remote, TV on/off with the PC (experimental)","kind":"toggle","parent":"","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true}]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":[]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":[]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":[]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":["nvidia","bigpicture"]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":[]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":["single"]}
@@ -1 +0,0 @@
{"version":"2.12.0","firstRun":true,"steamMachine":false,"kernel":"7.0.0-fixture-cachyos","pinnedKernel":"7.1.6-1","cecDevices":"","leds":0,"bios":null,"items":[{"id":"nvidia","label":"Gaming on NVIDIA","hint":"Steam on the desktop, started at login","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"bigpicture","label":"Steam starts in Big Picture","hint":"the controller-friendly Steam (untick: Steam's normal window)","kind":"toggle","parent":"nvidia","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"nvsilent","label":"Start Steam silently","hint":"in the tray at login, no window (untick: Steam's normal window)","kind":"toggle","parent":"nvidia","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"theme","label":"Install SteamOS theme","hint":"Vapor look (cachyos-vapor)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"single","label":"Single user mode","hint":"no password, lock screen or log out (SDDM)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"launcher","label":"Steamify shortcut","hint":"the app on the desktop, Steamify Terminal in the launcher","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"notify","label":"Update notifications","hint":"a notification when there's a new Steamify, never updates by itself","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"extended_controller_support","label":"Extended controller support","hint":"Xbox wireless dongle (xone), Xbox controllers over Bluetooth (xpadneo)","kind":"toggle","parent":"","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"cec","label":"HDMI-CEC","hint":"use Steam with the TV remote, TV on/off with the PC (experimental)","kind":"toggle","parent":"","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true}]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":["gaming","boot"]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":["gaming"]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":[]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":[]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":["machine","poweroff"]}
@@ -1 +0,0 @@
{"event":"plan","disable":[],"enable":["gaming","single"]}
@@ -1 +0,0 @@
{"version":"2.12.0","firstRun":true,"steamMachine":true,"kernel":"7.0.0-fixture-cachyos","pinnedKernel":"7.1.6-1","cecDevices":"","leds":0,"bios":{"current":"unknown","newest":"","selectable":false,"dryRun":false},"items":[{"id":"gaming","label":"SteamOS conversion","hint":"boot into gaming mode, Steam on the desktop","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"boot","label":"Boot into the desktop instead of gaming mode","hint":"","kind":"choice","parent":"gaming","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"silent","label":"Start Steam silently in desktop mode","hint":"in the tray at login on the desktop, no window","kind":"toggle","parent":"gaming","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"glyphs","label":"Install Steam Deck/Machine icons","hint":"Deck button icons in gaming mode","kind":"toggle","parent":"gaming","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"theme","label":"Install SteamOS theme","hint":"Vapor look (cachyos-vapor)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"single","label":"Single user mode","hint":"no password, lock screen or log out (SDDM)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"launcher","label":"Steamify shortcut","hint":"the app on the desktop, Steamify Terminal in the launcher","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"notify","label":"Update notifications","hint":"a notification when there's a new Steamify, never updates by itself","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"extended_controller_support","label":"Extended controller support","hint":"Xbox wireless dongle (xone), Xbox controllers over Bluetooth (xpadneo)","kind":"toggle","parent":"","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":true},{"id":"cec","label":"HDMI-CEC","hint":"use Steam with the TV remote, TV on/off with the PC (experimental)","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"machine","label":"Steam Machine support","hint":"LED bar driver, hardware settings in Steam","kind":"toggle","parent":"","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"poweroff","label":"Power-off fix","hint":"the Steam Machine stays off after shutting down","kind":"toggle","parent":"machine","needs":"","on":false,"wanted":true,"update":false,"new":false,"selectable":true},{"id":"bios","label":"Update BIOS","hint":"now unknown, newest unknown (offline?)","kind":"action","parent":"machine","needs":"","on":false,"wanted":false,"update":false,"new":false,"selectable":false}]}
@@ -1,3 +0,0 @@
NAME="CachyOS Linux"
ID=cachyos
ID_LIKE=arch
-2
View File
@@ -1,2 +0,0 @@
sddm
plasma-desktop
@@ -1 +0,0 @@
PRIME B650
@@ -1 +0,0 @@
ASUSTeK
@@ -1,3 +0,0 @@
NAME="CachyOS Linux"
ID=cachyos
ID_LIKE=arch
-1
View File
@@ -1 +0,0 @@
nvidia_drm
-3
View File
@@ -1,3 +0,0 @@
sddm
plasma-desktop
nvidia-utils
@@ -1 +0,0 @@
PRIME B650
@@ -1 +0,0 @@
ASUSTeK
@@ -1 +0,0 @@
0x030000
@@ -1 +0,0 @@
0x10de
@@ -1,3 +0,0 @@
NAME="CachyOS Linux"
ID=cachyos
ID_LIKE=arch
@@ -1,2 +0,0 @@
sddm
plasma-desktop
@@ -1 +0,0 @@
Fremont
@@ -1 +0,0 @@
Valve
-33
View File
@@ -1,33 +0,0 @@
#!/bin/bash
# Record what the bash backend (steamify.sh in $REPO) prints, per fixture, into share/golden/expected/.
# share/golden/record.sh record all | share/golden/record.sh check compare with the recorded files
set -uo pipefail
here="$(cd "$(dirname "$0")" && pwd)"
export REPO="${REPO:-$here/../../../steamify-cachyos}"; REPO="$(cd "$REPO" && pwd)"
backend="${BACKEND:-bash $REPO/steamify.sh}"
mode="${1:-record}"; failures=0; work="$(mktemp -d)"; trap 'rm -rf "$work"' EXIT
# case name -> backend arguments
# status: the whole output. plan-*: only the first line of the apply stream (the plan event, where the rules live);
# the steps after it need the real system (the VM suite), they are not stable with a fake sudo.
cases=("status:--backend status"
"plan-gaming:--backend apply gaming"
"plan-gaming-desktop:--backend apply --boot desktop gaming boot"
"plan-single:--backend apply single"
"plan-poweroff:--backend apply poweroff"
"plan-nothing:--backend apply"
"plan-nvidia:--backend apply nvidia bigpicture")
for fixture in "$here"/fixtures/*/; do
name="$(basename "$fixture")"
for entry in "${cases[@]}"; do
label="${entry%%:*}"; arguments="${entry#*:}"
expected="$here/expected/$name.$label.json"; mkdir -p "$here/expected"
if [[ "$label" == plan-* ]]; then # the plan event comes first; then the steps run for real, so stop after a moment
timeout -s KILL 5 "$here/sandbox.sh" "$fixture" $backend $arguments > "$work/stream" 2>&1
actual="$(head -n 1 "$work/stream")"
else actual="$("$here/sandbox.sh" "$fixture" $backend $arguments 2>&1)"; fi
if [[ "$mode" == record ]]; then printf '%s\n' "$actual" > "$expected"; echo "recorded $expected"
elif ! diff -u "$expected" <(printf '%s\n' "$actual"); then echo "FAIL $name $label"; failures=$((failures+1))
else echo "PASS $name $label"; fi
done
done
exit $failures
-32
View File
@@ -1,32 +0,0 @@
#!/bin/bash
# Run a command in a throw-away copy of a machine described by a fixture folder (no VM, no root).
# share/golden/sandbox.sh <fixture> <command>...
# <fixture>/etc/**, <fixture>/sys/**, <fixture>/usr/** : files shown at those places (the rest of /etc and /sys is empty)
# <fixture>/home/ : the user's home (fresh copy each run)
# <fixture>/packages, enabled-units, active-units : answers of the fake pacman and systemctl (shims/)
# <fixture>/env : optional VAR=value lines for the command
# Needs bubblewrap. $GOLDEN_LOG collects the writes the shims were asked to make.
set -euo pipefail
here="$(cd "$(dirname "$0")" && pwd)"
fixture="$(cd "${1:?usage: $0 <fixture> <command>...}" && pwd)"; shift
work="$(mktemp -d)"; trap 'rm -rf "$work"' EXIT
mkdir -p "$work/home" "$work/fixture"
cp -a "$fixture/." "$work/fixture/"
[[ -d "$fixture/home" ]] && cp -a "$fixture/home/." "$work/home/"
arguments=(--die-with-parent --unshare-pid --ro-bind / / --dev /dev --proc /proc --tmpfs /tmp --tmpfs /sys --tmpfs /etc
--bind "$work/home" "$HOME" --bind "$work/fixture" /mnt --ro-bind "$here/shims" /media)
[[ -n "${REPO:-}" ]] && arguments+=(--ro-bind "$REPO" "$REPO")
for keep in passwd group nsswitch.conf ld.so.cache ld.so.conf ld.so.conf.d localtime alternatives resolv.conf hostname; do
[[ -e "/etc/$keep" ]] && arguments+=(--ro-bind "/etc/$keep" "/etc/$keep")
done
for root in etc sys; do
[[ -d "$fixture/$root" ]] || continue
while IFS= read -r -d '' file; do
arguments+=(--ro-bind "$work/fixture/${file#"$fixture/"}" "/${file#"$fixture/"}")
done < <(find "$fixture/$root" -type f -print0)
done
environment=(--setenv FIXTURE /mnt --setenv PATH "/media:$PATH" --setenv GOLDEN_LOG "${GOLDEN_LOG:-/mnt/writes.log}")
[[ -f "$fixture/env" ]] && while IFS= read -r line; do
[[ "$line" == *=* ]] && environment+=(--setenv "${line%%=*}" "${line#*=}")
done < "$fixture/env"
exec bwrap "${arguments[@]}" "${environment[@]}" "$@"
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
# Fake modinfo: modules listed in $FIXTURE/modules exist.
for module in "$@"; do [[ "$module" == -* ]] || grep -qx -- "$module" "$FIXTURE/modules" 2>/dev/null || exit 1; done
-10
View File
@@ -1,10 +0,0 @@
#!/bin/bash
# Fake pacman for the golden sandbox: the installed packages are listed in $FIXTURE/packages (one name per line).
# Only the queries the status code makes: -Q/-Qq <pkg>, -T <pkg>..., -Qi <pkg>. Writes (-S, -U, -R) are logged and succeed.
list="$FIXTURE/packages"; touch "$list" 2>/dev/null
case "$1" in
-T) shift; for package in "$@"; do grep -qx -- "$package" "$list" || echo "$package"; done; [[ $# -gt 0 ]] ;;
-Q|-Qq|-Qi|-Qs) shift; status=0; for package in "$@"; do [[ "$package" == -* ]] && continue; grep -qx -- "$package" "$list" || status=1; done; exit $status ;;
-Ss|-Si) exit 1 ;;
*) echo "pacman $*" >> "${GOLDEN_LOG:-/dev/null}"; exit 0 ;;
esac
-4
View File
@@ -1,4 +0,0 @@
#!/bin/bash
# Fake sudo: logs the command and succeeds; nothing runs.
while [[ "$1" == -* ]]; do shift; done
echo "sudo $*" >> "${GOLDEN_LOG:-/dev/null}"
-13
View File
@@ -1,13 +0,0 @@
#!/bin/bash
# Fake systemctl: enabled units listed in $FIXTURE/enabled-units, active ones in $FIXTURE/active-units.
# Queries answer from those lists; everything else is logged and succeeds.
verb=""; units=()
for argument in "$@"; do
[[ "$argument" == -* ]] && continue
if [[ -z "$verb" ]]; then verb="$argument"; else units+=("$argument"); fi
done
case "$verb" in
is-enabled) for unit in "${units[@]}"; do grep -qx -- "$unit" "$FIXTURE/enabled-units" 2>/dev/null || { echo disabled; exit 1; }; done; echo enabled ;;
is-active) for unit in "${units[@]}"; do grep -qx -- "$unit" "$FIXTURE/active-units" 2>/dev/null || { echo inactive; exit 3; }; done; echo active ;;
*) echo "systemctl $*" >> "${GOLDEN_LOG:-/dev/null}"; exit 0 ;;
esac
-2
View File
@@ -1,2 +0,0 @@
#!/bin/bash
if [[ "$1" == -r ]]; then echo 7.0.0-fixture-cachyos; else command uname "$@"; fi
@@ -1,30 +0,0 @@
# Go core (REFACTOR-2.12 phase 0/1): `steamify --backend apply` through the Go binary must emit the
# same event stream as the bash backend: enable two small items, then turn them off again, once with
# each backend, in the same VM. Needs the binary built in the repo (make build -> bin/steamify).
GO=/mnt/bin/steamify
[[ -x $GO ]] || { fail "no $GO (run make build in steamify-cachyos)"; exit 0; }
export STEAMIFY_NO_DOWNLOAD=1
backend_run() { # backend_run <label> <command...>: the event stream of one apply, log lines dropped
# Only the structure (plan, start, done, finished): the log lines of the first run hold pacman's install output, which the
# second run on the same machine does not repeat.
"$@" 2>&1 < /dev/null | sed 's/\x1b\[[0-9;]*m//g' | grep -v '^{"event":"log"'
}
status_json() { "$@" --backend status 2>/dev/null; }
info "status through both backends"
bash_status=$(bash /mnt/steamify.sh --backend status 2>/dev/null); go_status=$($GO --backend status 2>/dev/null)
[[ -n $bash_status && "$bash_status" == "$go_status" ]] && pass "status identical" || fail "status differs"
for step in "launcher notify" ""; do
# shellcheck disable=SC2086
bash_events=$(backend_run bash /mnt/steamify.sh --backend apply $step)
# put the machine back for the Go run
# shellcheck disable=SC2086
if [[ -n $step ]]; then backend_run bash /mnt/steamify.sh --backend apply >/dev/null; else backend_run bash /mnt/steamify.sh --backend apply launcher notify >/dev/null; fi
# shellcheck disable=SC2086
go_events=$(backend_run $GO --backend apply $step)
label="apply ${step:-nothing (turn off)}"
if [[ "$bash_events" == "$go_events" ]]; then pass "$label: same event stream ($(wc -l <<< "$bash_events") lines)"
else fail "$label: streams differ: $(diff <(echo "$bash_events") <(echo "$go_events") | head -6 | tr '\n' '|')"; fi
done
grep -q '"finished"' <<< "$go_events" && pass "Go run finished" || fail "no finished event: $(tail -n 2 <<< "$go_events")"
+26
View File
@@ -0,0 +1,26 @@
# K1: the GNOME prototype leaves KDE alone: KDE offers its own theme and single user mode and not the GNOME theme, the conversion
# touches no GDM file and keeps CachyOS's session tools, --desktop works, the plasmalogin login manager is kept.
[[ "$(desktop_kind)" == kde ]] && pass "K1 desktop_kind: kde" || fail "K1 desktop_kind: $(desktop_kind)"
desktop_installed gnome && fail "K1 GNOME is installed on the KDE VM" || pass "K1 no GNOME installed"
out=$(printf 'q\n' | bash /mnt/steamify.sh 2>&1 | sed 's/\x1b\[[0-9;]*m//g')
grep -q "Install SteamOS theme: Vapor" <<< "$out" && pass "K1 Plasma theme offered" || fail "K1 no Plasma theme row"
grep -q "Single user mode" <<< "$out" && pass "K1 single user mode offered" || fail "K1 no single user mode"
grep -q "SteamOS theme for GNOME" <<< "$out" && fail "K1 GNOME theme offered on KDE" || pass "K1 GNOME theme hidden"
bash /mnt/steamify.sh --defaults --options gnometheme </dev/null 2>&1 | sed 's/\x1b\[[0-9;]*m//g' | grep -qi "unknown item\|not available\|can't" && pass "K1 --options gnometheme is refused on KDE" || skip "K1 --options gnometheme: no refusal text"
sum_sel=$(sha256sum /usr/bin/steamos-session-select 2>/dev/null | cut -d' ' -f1)
info "applying the conversion on KDE..."
sf --defaults --options gaming,theme,launcher --boot gamescope >/tmp/k1.out; rc=$?
[[ $rc -eq 0 ]] && pass "K1 exit 0" || fail "K1 exit $rc: $(grep -m1 ERROR /tmp/k1.out)"
expect_on gaming theme launcher
[[ "$(current_display_manager)" == plasmalogin ]] && pass "K1 plasmalogin stays the login manager" || fail "K1 login manager: $(current_display_manager)"
[[ ! -d /usr/local/share/steamify-gdm && ! -f /etc/pacman.d/hooks/95-steamify-gdm.hook && ! -f /etc/sudoers.d/steamify-gdm-relogin ]] && pass "K1 no GDM files installed" || fail "K1 GDM files on a KDE system"
[[ ! -e /usr/bin/steamos-session-select.bak-steamify ]] && [[ "$(sha256sum /usr/bin/steamos-session-select | cut -d' ' -f1)" != "" ]] && ! grep -q 'steamify-gdm-relogin' /usr/bin/steamos-session-select && pass "K1 CachyOS's steamos-session-select untouched" || fail "K1 steamos-session-select was replaced on KDE"
! grep -q 'AccountsService' /usr/lib/steamos/steam-set-session && pass "K1 CachyOS's steam-set-session untouched" || fail "K1 steam-set-session was replaced on KDE"
[[ ! -e /etc/gdm/custom.conf ]] || ! grep -q AutomaticLogin /etc/gdm/custom.conf && pass "K1 no GDM autologin" || fail "K1 GDM autologin set on KDE"
pacman -Q plasma-keyboard >/dev/null 2>&1 && pass "K1 plasma-keyboard installed (KDE package set)" || fail "K1 plasma-keyboard missing"
for p in gnome-shell-extension-desktop-icons-ng gnome-shell-extension-appindicator; do pacman -Q $p >/dev/null 2>&1 && fail "K1 $p installed on KDE" || pass "K1 no $p"; done
# --desktop works on KDE too and the file goes away cleanly
for v in kde gnome last; do bash /mnt/steamify.sh --desktop $v </dev/null >/dev/null 2>&1; [[ "$(cat /etc/steamify/desktop 2>/dev/null)" == "$v" ]] && pass "K1 --desktop $v" || fail "K1 --desktop $v"; done
sudo rm -f /etc/steamify/desktop
sf --defaults --options notify >/dev/null; expect_off gaming theme
[[ "$(current_display_manager)" == plasmalogin ]] && pass "K1 off: plasmalogin" || fail "K1 off: $(current_display_manager)"
+18
View File
@@ -0,0 +1,18 @@
# GN1: the menu and the checks on a GNOME (GDM) PC, the new GNOME items: the GNOME theme is offered, Plasma's theme and single user mode are not.
menu() { printf "$1" | bash /mnt/steamify.sh 2>&1 | sed 's/\x1b\[[0-9;]*m//g'; }
[[ "$(desktop_kind)" == gnome ]] && pass "GN1 desktop_kind: gnome" || fail "GN1 desktop_kind: $(desktop_kind)"
[[ "$(current_display_manager)" == gdm ]] && pass "GN1 the login manager is GDM" || fail "GN1 login manager: $(current_display_manager)"
desktop_installed gnome && ! desktop_installed kde && pass "GN1 only GNOME is installed" || fail "GN1 installed desktops are not just GNOME"
out=$(menu 'q\n')
grep -qE "^ +[0-9]+ +[a-z-]+ +\[[ x]\] .*SteamOS conversion" <<< "$out" && pass "GN1 SteamOS conversion offered" || fail "GN1 no SteamOS conversion row"
grep -qE "^ +[0-9]+ +[a-z-]+ +\[[ x]\] .*SteamOS theme for GNOME" <<< "$out" && pass "GN1 GNOME theme offered" || fail "GN1 no GNOME theme row"
grep -qE "Install SteamOS theme: Vapor" <<< "$out" && fail "GN1 Plasma's theme is offered on GNOME" || pass "GN1 Plasma's theme hidden"
grep -q "Single user mode" <<< "$out" && fail "GN1 single user mode is offered on GNOME" || pass "GN1 single user mode hidden"
grep -q '^\[ERROR\]' <<< "$out" && fail "GN1 menu error: $(grep -m1 '^\[ERROR\]' <<< "$out")" || pass "GN1 menu without errors"
# the same through the backend (what the app reads)
st=$(bash /mnt/steamify.sh --backend status 2>/dev/null)
python3 -c 'import json,sys; json.loads(sys.argv[1])' "$st" 2>/dev/null && pass "GN1 --backend status is valid JSON" || fail "GN1 --backend status is not JSON"
grep -q gnometheme <<< "$st" && pass "GN1 backend lists gnometheme" || fail "GN1 backend has no gnometheme"
grep -qE '"(theme|single)"' <<< "$st" && fail "GN1 backend lists theme/single on GNOME" || pass "GN1 backend leaves out theme and single"
# bad arguments
bash /mnt/steamify.sh --defaults --options single </dev/null 2>&1 | sed 's/\x1b\[[0-9;]*m//g' | grep -qi "unknown item\|not available\|can't" && pass "GN1 --options single is refused on GNOME" || skip "GN1 --options single: no refusal text (check by hand)"
+35
View File
@@ -0,0 +1,35 @@
# GN2: the SteamOS conversion on GDM: autologin, session in AccountsService, GDM-aware session tools, hook, sudoers, GNOME extras.
info "applying the conversion on GNOME (installs gamescope, steam: a few minutes)..."
sf --defaults --options gaming,launcher --boot gamescope >/tmp/gn2.out; rc=$?
[[ $rc -eq 0 ]] && pass "GN2 exit 0" || { fail "GN2 exit $rc: $(grep -m1 ERROR /tmp/gn2.out)"; }
expect_on gaming launcher
conf=/etc/gdm/custom.conf
sed -n '/^\[daemon\]/,/^\[/p' $conf | grep -qx 'AutomaticLoginEnable=True' && pass "GN2 AutomaticLoginEnable=True in [daemon]" || fail "GN2 no AutomaticLoginEnable"
sed -n '/^\[daemon\]/,/^\[/p' $conf | grep -qx "AutomaticLogin=$USER" && pass "GN2 AutomaticLogin=$USER" || fail "GN2 no AutomaticLogin=$USER"
[[ $(grep -c '^AutomaticLogin=' $conf) -eq 1 ]] && pass "GN2 one AutomaticLogin line" || fail "GN2 AutomaticLogin lines: $(grep -c '^AutomaticLogin=' $conf)"
[[ -f $conf.bak-steamify ]] && pass "GN2 custom.conf backup kept" || fail "GN2 no custom.conf backup"
acc=/var/lib/AccountsService/users/$USER
sudo grep -qx 'Session=gamescope-session' $acc && pass "GN2 AccountsService Session=gamescope-session" || fail "GN2 Session: $(sudo grep Session= $acc)"
sudo grep -qx 'XSession=gamescope-session' $acc && pass "GN2 AccountsService XSession=gamescope-session" || fail "GN2 XSession: $(sudo grep XSession= $acc)"
grep -q 'steamify-gdm-relogin' /usr/bin/steamos-session-select && pass "GN2 steamos-session-select is the GDM-aware one" || fail "GN2 steamos-session-select is not ours"
grep -q 'AccountsService' /usr/lib/steamos/steam-set-session && pass "GN2 steam-set-session is the GDM-aware one" || fail "GN2 steam-set-session is not ours"
[[ -f /usr/bin/steamos-session-select.bak-steamify && -f /usr/lib/steamos/steam-set-session.bak-steamify ]] && pass "GN2 CachyOS's tools kept as .bak-steamify" || fail "GN2 no .bak-steamify copies"
[[ -f /etc/pacman.d/hooks/95-steamify-gdm.hook ]] && pass "GN2 pacman hook" || fail "GN2 no pacman hook"
sudo visudo -cf /etc/sudoers.d/steamify-gdm-relogin >/dev/null 2>&1 && pass "GN2 sudoers rule valid" || fail "GN2 sudoers rule missing or invalid"
[[ -x /usr/local/libexec/steamify-gdm-relogin ]] && pass "GN2 relogin helper" || fail "GN2 no relogin helper"
sudo -n -l /usr/local/libexec/steamify-gdm-relogin >/dev/null 2>&1 && pass "GN2 sudo allows the relogin helper without a password" || fail "GN2 sudo -l does not list the helper"
for p in kconfig accountsservice gnome-shell-extension-desktop-icons-ng gnome-shell-extension-appindicator extension-manager gamescope-session-cachyos steam; do
pacman -Q $p >/dev/null 2>&1 && pass "GN2 $p installed" || fail "GN2 $p missing"
done
pacman -Q plasma-keyboard >/dev/null 2>&1 && fail "GN2 plasma-keyboard installed on GNOME" || pass "GN2 no plasma-keyboard"
pacman -Q plasma-desktop >/dev/null 2>&1 && fail "GN2 Plasma got installed" || pass "GN2 no Plasma pulled in"
sc="$HOME/.local/share/applications/steamify-return-to-gaming-mode.desktop"
[[ -f "$sc" ]] && grep -q 'steamos-session-select' "$sc" && pass "GN2 Return to Gaming Mode in the launcher" || fail "GN2 no Return to Gaming Mode launcher entry"
[[ "$(current_display_manager)" == gdm ]] && pass "GN2 GDM stays the login manager" || fail "GN2 login manager: $(current_display_manager)"
systemctl is-enabled gdm.service >/dev/null 2>&1 && pass "GN2 gdm.service enabled" || fail "GN2 gdm.service not enabled"
# shellcheck on our new tools, and a second apply changes nothing
command -v shellcheck >/dev/null && { shellcheck -S warning -e SC2034,SC2154 -x /mnt/patches/steamify-gdm-*.sh /mnt/lib/desktop.sh /mnt/lib/gnome-theme.sh >/tmp/gn2.sc 2>&1 && pass "GN2 shellcheck clean" || fail "GN2 shellcheck: $(head -3 /tmp/gn2.sc | tr '\n' ' ')"; } || skip "GN2 no shellcheck"
sf --defaults --options gaming,launcher --boot gamescope >/tmp/gn2b.out; [[ $? -eq 0 ]] && pass "GN2 second apply: exit 0" || fail "GN2 second apply failed"
[[ $(grep -c '^AutomaticLogin=' $conf) -eq 1 && $(grep -c 'AutomaticLoginEnable' $conf) -eq 1 ]] && pass "GN2 second apply: no duplicate lines in custom.conf" || fail "GN2 second apply duplicated lines"
dup=""; for f in ~/.local/state/steamify/*; do [ -f "$f" ] && d=$(cut -f1-3 "$f" | sort | uniq -d) && [ -n "$d" ] && dup+="$(basename "$f"): $d; "; done
[[ -z "$dup" ]] && pass "GN2 no duplicate journal entries" || fail "GN2 DUPLICATES: $dup"
+17
View File
@@ -0,0 +1,17 @@
# GN3: turning the conversion off restores GDM: custom.conf, CachyOS's own session tools, no hook, no sudoers rule.
conf=/etc/gdm/custom.conf
sudo cp -a $conf /tmp/custom.conf.orig
sum_sel=$(sudo sha256sum /usr/bin/steamos-session-select 2>/dev/null | cut -d' ' -f1); sum_set=$(sudo sha256sum /usr/lib/steamos/steam-set-session 2>/dev/null | cut -d' ' -f1)
info "applying, then turning everything off..."
sf --defaults --options gaming,launcher --boot gamescope >/dev/null; expect_on gaming
sf --defaults --options notify >/dev/null; rc=$?
[[ $rc -eq 0 ]] && pass "GN3 off: exit 0" || fail "GN3 off: exit $rc"
expect_off gaming launcher
# (the test VM's GDM already autologs in, from vminstall.sh: the file must be exactly what it was)
diff <(grep -v '^#' /tmp/custom.conf.orig) <(grep -v '^#' $conf) >/dev/null && pass "GN3 custom.conf is the original again" || fail "GN3 custom.conf differs from the original"
[[ ! -e $conf.bak-steamify ]] && pass "GN3 backup removed" || fail "GN3 backup left"
[[ ! -f /etc/pacman.d/hooks/95-steamify-gdm.hook && ! -f /etc/sudoers.d/steamify-gdm-relogin && ! -e /usr/local/libexec/steamify-gdm-relogin && ! -d /usr/local/share/steamify-gdm ]] && pass "GN3 hook, sudoers rule, helper and our tools are gone" || fail "GN3 leftovers: $(ls /etc/pacman.d/hooks/95-steamify-gdm.hook /etc/sudoers.d/steamify-gdm-relogin /usr/local/libexec/steamify-gdm-relogin /usr/local/share/steamify-gdm 2>&1 | grep -v 'No such' | tr '\n' ' ')"
! grep -q 'steamify-gdm-relogin' /usr/bin/steamos-session-select 2>/dev/null && pass "GN3 steamos-session-select is CachyOS's again" || fail "GN3 steamos-session-select is still ours"
! grep -q 'AccountsService' /usr/lib/steamos/steam-set-session 2>/dev/null && pass "GN3 steam-set-session is CachyOS's again" || fail "GN3 steam-set-session is still ours"
[[ "$(current_display_manager)" == gdm ]] && pass "GN3 GDM still the login manager (not switched to plasmalogin)" || fail "GN3 login manager: $(current_display_manager)"
[[ ! -f "$HOME/.local/share/applications/steamify-return-to-gaming-mode.desktop" ]] && pass "GN3 launcher entry gone" || fail "GN3 launcher entry left"
+26
View File
@@ -0,0 +1,26 @@
# GN4: the SteamOS theme for GNOME: gsettings, GTK4 colors, extensions; off puts everything back.
get() { gsettings get "$@"; }
before_scheme=$(get org.gnome.desktop.interface color-scheme); before_bg=$(get org.gnome.desktop.background picture-uri)
before_layout=$(get org.gnome.desktop.wm.preferences button-layout)
info "applying the GNOME theme (installs cachyos-vapor, downloads the dock: a few minutes)..."
sf --defaults --options gnometheme >/tmp/gn4.out; rc=$?
[[ $rc -eq 0 ]] && pass "GN4 exit 0" || fail "GN4 exit $rc: $(grep -m1 ERROR /tmp/gn4.out)"
expect_on gnometheme
[[ "$(get org.gnome.desktop.interface color-scheme)" == "'prefer-dark'" ]] && pass "GN4 dark style" || fail "GN4 color-scheme: $(get org.gnome.desktop.interface color-scheme)"
[[ "$(get org.gnome.desktop.interface accent-color 2>/dev/null)" == "'blue'" ]] && pass "GN4 blue accent" || skip "GN4 accent-color: $(get org.gnome.desktop.interface accent-color 2>&1 | head -1)"
get org.gnome.desktop.background picture-uri | grep -q 'Steam%20Deck' && pass "GN4 Steam Deck wallpaper" || fail "GN4 wallpaper: $(get org.gnome.desktop.background picture-uri)"
get org.gnome.desktop.wm.preferences button-layout | grep -q minimize && pass "GN4 minimize/maximize buttons" || fail "GN4 button layout"
grep -qF "/* Steamify GNOME theme */" ~/.config/gtk-4.0/gtk.css && pass "GN4 GTK4 colors written" || fail "GN4 no gtk.css mark"
[[ -f ~/.local/share/gnome-shell/extensions/steamify-vapor@steamify.github.io/metadata.json ]] && pass "GN4 Steamify Vapor extension" || fail "GN4 no Steamify Vapor extension"
[[ -f ~/.local/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/metadata.json ]] && pass "GN4 Ubuntu Dock built" || fail "GN4 no Ubuntu Dock"
[[ -f ~/.local/share/gnome-shell/extensions/tiling-assistant@ubuntu.com/metadata.json ]] && pass "GN4 Tiling Assistant" || fail "GN4 no Tiling Assistant"
sf --defaults --options gnometheme >/dev/null; [[ $? -eq 0 ]] && pass "GN4 second apply: exit 0" || fail "GN4 second apply failed"
[[ $(grep -c "Steamify GNOME theme" ~/.config/gtk-4.0/gtk.css) -eq 1 ]] && pass "GN4 one theme block in gtk.css" || fail "GN4 gtk.css has $(grep -c 'Steamify GNOME theme' ~/.config/gtk-4.0/gtk.css) marks"
sf --defaults --options notify >/dev/null; rc=$?
[[ $rc -eq 0 ]] && pass "GN4 off: exit 0" || fail "GN4 off: exit $rc"
expect_off gnometheme
[[ "$(get org.gnome.desktop.interface color-scheme)" == "$before_scheme" ]] && pass "GN4 off: color-scheme restored" || fail "GN4 off: color-scheme $(get org.gnome.desktop.interface color-scheme), was $before_scheme"
[[ "$(get org.gnome.desktop.background picture-uri)" == "$before_bg" ]] && pass "GN4 off: wallpaper restored" || fail "GN4 off: wallpaper $(get org.gnome.desktop.background picture-uri)"
[[ "$(get org.gnome.desktop.wm.preferences button-layout)" == "$before_layout" ]] && pass "GN4 off: button layout restored" || fail "GN4 off: layout $(get org.gnome.desktop.wm.preferences button-layout)"
[[ ! -e ~/.config/gtk-4.0/gtk.css ]] || ! grep -qF "Steamify GNOME theme" ~/.config/gtk-4.0/gtk.css && pass "GN4 off: GTK4 colors gone" || fail "GN4 off: gtk.css still ours"
[[ ! -e ~/.local/share/gnome-shell/extensions/steamify-vapor@steamify.github.io ]] && pass "GN4 off: our extension removed" || fail "GN4 off: extension left"
+16
View File
@@ -0,0 +1,16 @@
# GN5: --desktop kde|gnome|last: the desktop "Switch to Desktop" goes to; the session tool resolves it.
for v in kde gnome last; do
bash /mnt/steamify.sh --desktop $v </dev/null >/dev/null 2>&1; rc=$?
[[ $rc -eq 0 && "$(cat /etc/steamify/desktop)" == "$v" ]] && pass "GN5 --desktop $v stored" || fail "GN5 --desktop $v: exit $rc, file: $(cat /etc/steamify/desktop 2>&1)"
done
out=$(bash /mnt/steamify.sh --desktop sideways </dev/null 2>&1); rc=$?
[[ $rc -eq 1 ]] && grep -q "kde, gnome or last" <<< "$out" && pass "GN5 --desktop sideways refused" || fail "GN5 --desktop sideways: exit $rc"
out=$(bash /mnt/steamify.sh --desktop </dev/null 2>&1); [[ $? -eq 1 ]] && pass "GN5 --desktop without a value refused" || fail "GN5 --desktop without a value was accepted"
# the session tool: "desktop" resolves to what is installed (only GNOME here), whatever the preference says
tool=/tmp/gn5-set-session; cp /mnt/patches/steamify-gdm-steam-set-session.sh $tool
for v in kde gnome last; do
sudo bash -c "echo $v > /etc/steamify/desktop"
got=$(bash -c "source <(sed -n '/^have_session()/p;/^resolve_desktop()/,/^}/p' $tool); resolve_desktop")
[[ "$got" == gnome.desktop ]] && pass "GN5 pref $v with only GNOME installed -> gnome.desktop" || fail "GN5 pref $v -> $got"
done
sudo rm -f /etc/steamify/desktop
+34
View File
@@ -0,0 +1,34 @@
# GN6: gaming <-> GNOME on GDM with a stand-in gamescope session (gamescope doesn't render in the VM): boot into it, Switch to Desktop,
# the shortcut's command back, reboot persistence, "boot into the desktop". Needs the host's ssh without polling during a relogin
# (a logged-in ssh session keeps the old user manager alive).
standin() { guest 'f=/usr/share/wayland-sessions/gamescope-session.desktop; sudo cp -n $f $f.real; sudo sed -i "s|^Exec=.*|Exec=/usr/bin/sleep infinity|" $f; echo done' | tail -n 1 | grep -q done; }
in_gnome() { vm_ssh "pgrep -u $VM_USER -x gnome-shell" >/dev/null 2>&1; }
in_standin() { vm_ssh "pgrep -u $VM_USER -f 'sleep infinity'" >/dev/null 2>&1 && ! in_gnome; }
wait_for() { local what="$1" _; for _ in $(seq 40); do "$what" && return 0; sleep 3; done; return 1; }
info "applying the conversion (a few minutes)..."
guest 'sf --defaults --options gaming --boot gamescope >/dev/null; echo done' | tail -n 1 | grep -q done && pass "GN6 conversion applied" || { fail "GN6 apply"; return 0 2>/dev/null || exit 0; }
standin && pass "GN6 stand-in gamescope session in place" || fail "GN6 stand-in"
# 1. reboot: GDM logs in by itself, into gamescope (the stand-in)
reboot_guest && pass "GN6 the VM is back after the reboot" || { fail "GN6 no ssh after the reboot"; return 0 2>/dev/null || exit 0; }
wait_for in_standin && pass "GN6 boot: autologin into the gamescope session" || fail "GN6 boot: not in gamescope (gnome-shell: $(in_gnome && echo yes || echo no))"
# 2. Switch to Desktop (what Steam's button runs)
vm_ssh "XDG_RUNTIME_DIR=/run/user/\$(id -u) systemd-run --user --pipe --quiet /usr/bin/steamos-session-select desktop" >/dev/null 2>&1; sleep 45
wait_for in_gnome && pass "GN6 steamos-session-select desktop -> GNOME" || fail "GN6 switch to the desktop: no gnome-shell"
# 3. Return to Gaming Mode (the shortcut's command)
sc='~/.local/share/applications/steamify-return-to-gaming-mode.desktop'
cmd=$(vm_ssh "sed -n 's/^Exec=//p' $sc | head -n 1" 2>/dev/null)
[[ -n "$cmd" ]] && pass "GN6 shortcut Exec: $cmd" || fail "GN6 the shortcut has no Exec"
vm_ssh "XDG_RUNTIME_DIR=/run/user/\$(id -u) systemd-run --user --pipe --quiet $cmd" >/dev/null 2>&1; sleep 45
wait_for in_standin && pass "GN6 Return to Gaming Mode -> gamescope" || fail "GN6 back to gaming: not in the stand-in"
# 4. desktop again, then the GNOME session ends: the next login is gamescope (Deck behaviour)
vm_ssh "XDG_RUNTIME_DIR=/run/user/\$(id -u) systemd-run --user --pipe --quiet /usr/bin/steamos-session-select desktop" >/dev/null 2>&1; sleep 45
wait_for in_gnome && pass "GN6 desktop again" || fail "GN6 second switch to the desktop failed"
# 5. boot into the desktop: reboot lands in GNOME; then back to gamescope
guest 'sf --boot desktop >/dev/null; echo done' | tail -n 1 | grep -q done && pass "GN6 --boot desktop" || fail "GN6 --boot desktop"
guest 'systemctl is-enabled steamify-boot-desktop.service' | tail -n 1 | grep -q enabled && pass "GN6 boot-desktop unit enabled" || fail "GN6 boot-desktop unit not enabled"
guest 'grep ExecStart=/usr/lib/steamos /etc/systemd/system/steamify-boot-desktop.service' | grep -q 'steam-set-session desktop' && pass "GN6 the unit asks for the preferred desktop" || fail "GN6 unit: $(guest 'grep ExecStart= /etc/systemd/system/steamify-boot-desktop.service' | tr '\n' ' ')"
reboot_guest; wait_for in_gnome && pass "GN6 reboot with 'boot into desktop': GNOME" || fail "GN6 boot into desktop: no gnome-shell"
guest 'sf --boot gamescope >/dev/null; echo done' | tail -n 1 | grep -q done && pass "GN6 --boot gamescope" || fail "GN6 --boot gamescope"
reboot_guest; wait_for in_standin && pass "GN6 reboot with 'boot into gaming': gamescope" || fail "GN6 boot into gaming: not in the stand-in"
# 6. the GDM tools survive a package update of gamescope-session-cachyos (the pacman hook)
guest 'sudo pacman -S --noconfirm gamescope-session-cachyos >/dev/null 2>&1; grep -q steamify-gdm-relogin /usr/bin/steamos-session-select && echo ours' | tail -n 1 | grep -q ours && pass "GN6 pacman hook puts our tools back after a reinstall" || fail "GN6 the hook did not restore our session tools"
+29
View File
@@ -0,0 +1,29 @@
# GN7: KDE and GNOME installed together: the login manager stays, both themes are offered, the preferred desktop decides.
info "installing Plasma next to GNOME (a few minutes)..."
sudo pacman -S --needed --noconfirm plasma-desktop >/tmp/gn7.pac 2>&1; rc=$?
[[ $rc -eq 0 ]] && pass "GN7 plasma-desktop installed" || { fail "GN7 plasma-desktop: $(tail -n 2 /tmp/gn7.pac | tr '\n' ' ')"; exit 0; }
desktop_installed kde && desktop_installed gnome && pass "GN7 both desktops installed" || fail "GN7 desktop_installed"
menu() { printf "$1" | bash /mnt/steamify.sh 2>&1 | sed 's/\x1b\[[0-9;]*m//g'; }
out=$(menu 'q\n')
grep -q "SteamOS theme for GNOME" <<< "$out" && pass "GN7 GNOME theme offered" || fail "GN7 no GNOME theme row"
grep -q "Install SteamOS theme: Vapor" <<< "$out" && pass "GN7 Plasma theme offered too" || fail "GN7 no Plasma theme row"
grep -q "Single user mode" <<< "$out" && pass "GN7 single user mode offered" || fail "GN7 no single user mode"
[[ "$(current_display_manager)" == gdm ]] && pass "GN7 still GDM" || fail "GN7 display manager: $(current_display_manager)"
choose_login_manager; [[ "$LOGIN_MANAGER" == gdm ]] && pass "GN7 choose_login_manager keeps GDM" || fail "GN7 choose_login_manager: $LOGIN_MANAGER"
info "applying the conversion with both desktops..."
sf --defaults --options gaming --boot gamescope >/tmp/gn7.out; [[ $? -eq 0 ]] && pass "GN7 conversion applied" || fail "GN7 apply: $(grep -m1 ERROR /tmp/gn7.out)"
[[ "$(current_display_manager)" == gdm ]] && pass "GN7 GDM is still the login manager after the conversion" || fail "GN7 login manager changed to $(current_display_manager)"
grep -q 'AccountsService' /usr/lib/steamos/steam-set-session && pass "GN7 our session tools are in (Plasma is installed too)" || fail "GN7 session tools not ours"
tool=/usr/lib/steamos/steam-set-session
res() { bash -c "source <(sed -n '/^have_session()/p;/^resolve_desktop()/,/^}/p' $tool); resolve_desktop"; }
sudo mkdir -p /etc/steamify /var/lib/steamify
for pair in "kde plasma.desktop" "gnome gnome.desktop"; do
set -- $pair; echo $1 | sudo tee /etc/steamify/desktop >/dev/null
got=$(res); [[ "$got" == "$2" ]] && pass "GN7 preferred $1 -> $2" || fail "GN7 preferred $1 -> $got"
done
echo last | sudo tee /etc/steamify/desktop >/dev/null
echo gnome | sudo tee /var/lib/steamify/last-desktop >/dev/null; [[ "$(res)" == gnome.desktop ]] && pass "GN7 last used gnome -> gnome.desktop" || fail "GN7 last=gnome -> $(res)"
echo kde | sudo tee /var/lib/steamify/last-desktop >/dev/null; [[ "$(res)" == plasma.desktop ]] && pass "GN7 last used kde -> plasma.desktop" || fail "GN7 last=kde -> $(res)"
# the GNOME theme and the KDE theme are independent
sf --defaults --options gaming,gnometheme >/dev/null; [[ $? -eq 0 ]] && pass "GN7 GNOME theme with both desktops" || fail "GN7 GNOME theme failed"
expect_on gnometheme; expect_off theme
+6 -2
View File
@@ -6,7 +6,11 @@ pass() { echo "PASS $*"; }; fail() { echo "FAIL $*"; }; skip() { echo "SKIP $*";
sudo mountpoint -q /mnt || sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt sudo mountpoint -q /mnt || sudo mount -t 9p -o trans=virtio,version=9p2000.L repo /mnt
cd /mnt || exit 1 cd /mnt || exit 1
export SCRIPT_DIR=/mnt # steamify.sh sets it; the libs alone read patches/ and services/ from it export SCRIPT_DIR=/mnt # steamify.sh sets it; the libs alone read patches/ and services/ from it
for lib in common state packages login-manager single-user steam-desktop steam-machine fremont-poweroff vram-booster hdmi-refresh nvidia gamescope-nvidia controllers cec boot-session vapor-theme steamos-extras bios desktop-shortcut wizard-shortcut steam-game update-notifier; do # ssh has no desktop session variables: Steamify's desktop detection (lib/desktop.sh) reads the running one.
if [[ -z "${XDG_CURRENT_DESKTOP:-}" ]]; then
if pgrep -u "$USER" -x gnome-shell >/dev/null; then export XDG_CURRENT_DESKTOP=GNOME; elif pgrep -u "$USER" -x plasmashell >/dev/null; then export XDG_CURRENT_DESKTOP=KDE; fi
fi
for lib in common state desktop packages login-manager single-user steam-desktop steam-machine fremont-poweroff vram-booster hdmi-refresh nvidia gamescope-nvidia controllers cec boot-session vapor-theme gnome-theme steamos-extras bios desktop-shortcut wizard-shortcut steam-game update-notifier; do
# shellcheck source=/dev/null # shellcheck source=/dev/null
. "lib/$lib.sh" 2>/dev/null . "lib/$lib.sh" 2>/dev/null
done done
@@ -15,7 +19,7 @@ sf() { bash /mnt/steamify.sh "$@" < /dev/null 2>&1 | sed 's/\x1b\[[0-9;]*m//g';
is() { "${1}_status" 2>/dev/null; } is() { "${1}_status" 2>/dev/null; }
expect_on() { local i; for i in "$@"; do is "$i" && pass "$i is on" || fail "$i is off"; done; } expect_on() { local i; for i in "$@"; do is "$i" && pass "$i is on" || fail "$i is off"; done; }
expect_off() { local i; for i in "$@"; do is "$i" && fail "$i is on" || pass "$i is off"; done; } expect_off() { local i; for i in "$@"; do is "$i" && fail "$i is on" || pass "$i is off"; done; }
ticks() { local i; for i in gaming nvidia bigpicture theme glyphs single launcher notify vram cec machine poweroff boot; do is "$i" && printf '%s ' "$i"; done; echo; } ticks() { local i; for i in gaming nvidia bigpicture theme gnometheme glyphs single launcher notify vram cec machine poweroff boot; do is "$i" && printf '%s ' "$i"; done; echo; }
# fake_nvidia: an NVIDIA PC for the nvidia suite. A fake RTX 5080 in a fake DRM tree (NVIDIA_DRM_DIR is Steamify's test hook, exported # fake_nvidia: an NVIDIA PC for the nvidia suite. A fake RTX 5080 in a fake DRM tree (NVIDIA_DRM_DIR is Steamify's test hook, exported
# here: call it in every guest command that runs the wizard) and fake NVIDIA modules for every installed kernel (renamed copies of a # here: call it in every guest command that runs the wizard) and fake NVIDIA modules for every installed kernel (renamed copies of a
# tiny module, then depmod), so `modinfo nvidia_drm` finds one and the initramfs build has modules to put in. # tiny module, then depmod), so `modinfo nvidia_drm` finds one and the initramfs build has modules to put in.