Harden Panama launcher actions

This commit is contained in:
Gabriel Brown
2026-08-18 07:31:11 -04:00
parent b28edcd01f
commit ca64d4b9b6
11 changed files with 239 additions and 40 deletions
+14 -1
View File
@@ -47,12 +47,16 @@ cat >"$scratch/bin/qs" <<'SH'
printf 'qs' >>"$OSD_TEST_LOG"
printf ' <%s>' "$@" >>"$OSD_TEST_LOG"
printf '\n' >>"$OSD_TEST_LOG"
[[ ${OSD_TEST_FAIL_QS:-false} != true ]]
SH
chmod +x "$scratch/bin/"*
run_helper() {
PATH="$scratch/bin:$PATH" OSD_TEST_LOG="$log" "$helper" "$@"
PATH="$scratch/bin:$PATH" OSD_TEST_LOG="$log" \
OSD_TEST_FAIL_QS="${OSD_TEST_FAIL_QS:-false}" \
PANAMA_OSD_STRICT="${PANAMA_OSD_STRICT:-false}" \
"$helper" "$@"
}
assert_line() {
@@ -95,4 +99,13 @@ assert_line 'qs <ipc> <call> <osd> <message> <media-next> <Horizon — Tycho>'
run_helper message notifications-disabled-symbolic 'Do Not Disturb On'
assert_line 'qs <ipc> <call> <osd> <message> <notifications-disabled-symbolic> <Do Not Disturb On>'
: >"$log"
if OSD_TEST_FAIL_QS=true PANAMA_OSD_STRICT=1 run_helper message dialog-error-symbolic 'Strict failure'; then
printf 'osd helper contract: strict delivery swallowed an IPC failure\n' >&2
exit 1
fi
: >"$log"
OSD_TEST_FAIL_QS=true run_helper message dialog-information-symbolic 'Best effort'
printf 'osd helper contract: PASS\n'