summaryrefslogtreecommitdiff
path: root/tests/helpers.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-05 16:27:28 +0300
committerPaul Buetow <paul@buetow.org>2026-06-05 16:27:28 +0300
commite73a4803a9261cb71985872cf66be4a8b9fdda53 (patch)
treeb3dabecde882100c42119eac6aa2e2b2320cdc17 /tests/helpers.sh
parent3d3c5fda1021206655783b101e85f0b41f3588f4 (diff)
Fix staged generation signal cleanup
Diffstat (limited to 'tests/helpers.sh')
-rwxr-xr-xtests/helpers.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/helpers.sh b/tests/helpers.sh
index bf6000e..6306004 100755
--- a/tests/helpers.sh
+++ b/tests/helpers.sh
@@ -303,6 +303,29 @@ MAGICK
cp "$bin_dir/magick" "$bin_dir/convert"
}
+test::install_blocking_imagemagick() {
+ local -r bin_dir="$1"; shift
+
+ mkdir -p "$bin_dir"
+
+ cat > "$bin_dir/magick" <<'MAGICK'
+#!/usr/bin/env bash
+set -euo pipefail
+
+if [ "${1:-}" = identify ]; then
+ exit 0
+fi
+
+printf 'started\n' > "${TEST_BLOCKING_MAGICK_STARTED:?}"
+while [ ! -e "${TEST_BLOCKING_MAGICK_RELEASE:?}" ]; do
+ sleep 0.1
+done
+exit "${TEST_BLOCKING_MAGICK_EXIT:-42}"
+MAGICK
+ chmod 0755 "$bin_dir/magick"
+ cp "$bin_dir/magick" "$bin_dir/convert"
+}
+
test::install_failing_generation_tools() {
local -r bin_dir="$1"; shift
local name