diff options
| author | tranch <tranch.xiao@gmail.com> | 2026-09-13 19:05:58 +0800 |
|---|---|---|
| committer | tranch <tranch.xiao@gmail.com> | 2026-09-13 19:05:58 +0800 |
| commit | f068acf3b1c2a4551c5119997fd40909ddd35386 (patch) | |
| tree | a143b39aec7565909cbb4e7b3224edfcd347e984 /tests | |
| parent | 9f1490f28db8643e78cd26e3cd8f0c92909f16a2 (diff) | |
| download | AeroCore-OS-f068acf3b1c2a4551c5119997fd40909ddd35386.tar.gz AeroCore-OS-f068acf3b1c2a4551c5119997fd40909ddd35386.zip | |
Run shortcut migration before setup guard
Ensure legacy Return.desktop files are repaired even when Bazzite user
setup has already completed for the user.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup | 2 | ||||
| -rwxr-xr-x | tests/test-patch-bazzite-deck-identity.sh | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup b/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup index 9466a0b..4f40af4 100644 --- a/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup +++ b/tests/fixtures/bazzite-44/usr/libexec/bazzite-user-setup @@ -2,6 +2,8 @@ pkexec /usr/libexec/bazzite-privileged-user-setup "$USER" +# Run script if updated + # Minimal structural fixture from Bazzite 44.20260820. if [[ $IMAGE_NAME =~ "deck" ]]; then touch "$HOME/Desktop/Return.desktop" diff --git a/tests/test-patch-bazzite-deck-identity.sh b/tests/test-patch-bazzite-deck-identity.sh index 0b0586c..cbe4382 100755 --- a/tests/test-patch-bazzite-deck-identity.sh +++ b/tests/test-patch-bazzite-deck-identity.sh @@ -43,6 +43,10 @@ assert_count 1 "${deck_condition}" "${steam}" assert_count 3 "${deck_condition}" "${user_setup}" assert_count 1 'AeroCore Steam state migration' "${steam}" assert_count 1 'AeroCore Return to Gaming Mode shortcut migration' "${user_setup}" +if [[ "$(grep -nF 'AeroCore Return to Gaming Mode shortcut migration' "${user_setup}" | cut -d: -f1)" -ge "$(grep -nF '# Run script if updated' "${user_setup}" | cut -d: -f1)" ]]; then + echo "Return to Gaming Mode migration must run before the user setup early-exit guard" >&2 + exit 1 +fi # A second run must recognize the patched fixture and make no further changes. first_digest="$(sha256sum "${hardware_setup}" "${steam}" "${user_setup}")" |
