diff options
| author | tranch <tranch.xiao@gmail.com> | 2026-08-28 08:57:25 +0800 |
|---|---|---|
| committer | tranch <tranch.xiao@gmail.com> | 2026-08-28 08:57:35 +0800 |
| commit | 7889a92c2eea98189330ad1fbfbef4c33a7e3071 (patch) | |
| tree | b956f6670a15ab1730588b24567502ff82e64213 /tests/test-desktop-branding-migration.sh | |
| parent | 258e7422812b1a18f75c5a48030c64ccb16766ba (diff) | |
| download | AeroCore-OS-7889a92c2eea98189330ad1fbfbef4c33a7e3071.tar.gz AeroCore-OS-7889a92c2eea98189330ad1fbfbef4c33a7e3071.zip | |
Move branding migration into user setup
Diffstat (limited to 'tests/test-desktop-branding-migration.sh')
| -rwxr-xr-x | tests/test-desktop-branding-migration.sh | 21 |
1 files changed, 11 insertions, 10 deletions
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" |
