Files
ElyOffice/tests/scripts/pdf-idle.sh
T
ZacharyZhang-NY b7fca0146d Ely Office: six offline-first desktop apps in Rust and GPUI
ElyDoc, ElyTable, ElyShow (LibreOfficeKit), ElyPDF (MuPDF), ElyTree (Git),
ElyMark (Milkdown and CodeMirror in CEF). ElyMail and ElyAgent follow.
2026-10-08 21:20:08 -04:00

16 lines
560 B
Bash
Executable File

#!/usr/bin/env bash
# ElyPDF with no file starts no MuPDF worker (PERF-01).
set -euo pipefail
root=$(cd "$(dirname "$0")/../.." && pwd)
(cd "$root" && cargo build -q -p ely-pdf -p ely-pdf-engine)
ELY_NO_DIALOG=1 ELY_SMOKE=hold "$root/target/debug/ely-pdf" >/dev/null 2>&1 &
app=$!
trap 'kill $app 2>/dev/null || true' EXIT
sleep 3
kill -0 "$app" || { echo "FAIL: ElyPDF did not stay up"; exit 1; }
if pgrep -P "$app" -f ely-pdf-worker >/dev/null; then
echo "FAIL: a worker runs with no file open"
exit 1
fi
echo "pdf-idle: no worker before the first file"