summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup2
-rwxr-xr-xtests/test-desktop-branding-migration.sh21
2 files changed, 13 insertions, 10 deletions
diff --git a/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup b/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup
index 90a1ea8..9466a0b 100644
--- a/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup
+++ b/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup
@@ -1,5 +1,7 @@
#!/usr/bin/bash
+pkexec /usr/libexec/bazzite-privileged-user-setup "$USER"
+
# Minimal structural fixture from Bazzite 44.20260820.
if [[ $IMAGE_NAME =~ "deck" ]]; then
touch "$HOME/Desktop/Return.desktop"
diff --git a/tests/test-desktop-branding-migration.sh b/tests/test-desktop-branding-migration.sh
index 4948b39..4715010 100755
--- a/tests/test-desktop-branding-migration.sh
+++ b/tests/test-desktop-branding-migration.sh
@@ -7,23 +7,17 @@ test_root="$(mktemp -d -t aerocore-desktop-branding.XXXXXXXXXX)"
trap 'rm -rf "${test_root}"' EXIT
mkdir -p \
- "${test_root}/usr/share/aerocore/desktop-branding" \
- "${test_root}/etc/xdg" \
"${test_root}/var/home/stock/.config" \
"${test_root}/var/home/custom/.config"
-cp "${repo_root}/system_files/usr/share/aerocore/desktop-branding/kcm-about-distrorc" \
- "${test_root}/usr/share/aerocore/desktop-branding/kcm-about-distrorc"
-printf '%s\n' '[General]' 'Name=Bazzite' > "${test_root}/etc/xdg/kcm-about-distrorc"
printf '%s\n' 'icon=distributor-logo-steamdeck' \
> "${test_root}/var/home/stock/.config/plasma-org.kde.plasma.desktop-appletsrc"
printf '%s\n' 'icon=user-selected-logo' \
> "${test_root}/var/home/custom/.config/plasma-org.kde.plasma.desktop-appletsrc"
-AEROCORE_DESKTOP_BRANDING_ROOT="${test_root}" \
+HOME="${test_root}/var/home/stock" \
bash "${repo_root}/system_files/usr/libexec/aerocore-desktop-branding"
-grep -Fxq 'Name=AeroCore OS' "${test_root}/etc/xdg/kcm-about-distrorc"
grep -Fxq 'icon=aerocore-logo' \
"${test_root}/var/home/stock/.config/plasma-org.kde.plasma.desktop-appletsrc"
grep -Fxq 'icon=user-selected-logo' \
@@ -31,12 +25,10 @@ grep -Fxq 'icon=user-selected-logo' \
# The migration must also be idempotent.
first_digest="$(sha256sum \
- "${test_root}/etc/xdg/kcm-about-distrorc" \
"${test_root}/var/home/stock/.config/plasma-org.kde.plasma.desktop-appletsrc")"
-AEROCORE_DESKTOP_BRANDING_ROOT="${test_root}" \
+HOME="${test_root}/var/home/stock" \
bash "${repo_root}/system_files/usr/libexec/aerocore-desktop-branding"
second_digest="$(sha256sum \
- "${test_root}/etc/xdg/kcm-about-distrorc" \
"${test_root}/var/home/stock/.config/plasma-org.kde.plasma.desktop-appletsrc")"
test "${first_digest}" = "${second_digest}"
@@ -55,4 +47,13 @@ grep -Fq '"/usr/share/pixmaps/system-logo-white.png"' \
grep -Fq 'rm -f /usr/share/pixmaps/system-logo-white.png' \
"${repo_root}/installer/build.sh"
+# Branding migration is user setup, not a system boot service.
+if rg -n 'aerocore-desktop-branding\.service|systemctl enable aerocore-desktop-branding' \
+ "${repo_root}/build_files" "${repo_root}/system_files"; then
+ echo "Desktop branding must not be enabled as a system service" >&2
+ exit 1
+fi
+test ! -e "${repo_root}/system_files/usr/lib/systemd/system/aerocore-desktop-branding.service"
+test -x "${repo_root}/system_files/usr/libexec/aerocore-desktop-branding-privileged"
+
echo "Desktop branding migration fixture passed"