ekp/tests/run-tests.sh
Kinneyzhang fd1210e557 fix: close repository audit findings
Complete task002 through task016 across cache correctness, editor lifecycle, C boundaries, build and release governance, dictionary provenance, performance, interactive workflows, tests, documentation, and final cleanup.
2026-07-28 22:43:10 +08:00

32 lines
946 B
Bash
Executable File

#!/bin/sh
# Run the EKP test suite in batch mode.
# Usage: tests/run-tests.sh [path-to-emacs] [--random-order]
EMACS="${1:-${EMACS:-emacs}}"
ORDER="${2:-}"
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
case "$ORDER" in
"")
exec "$EMACS" -Q --batch -L "$ROOT" -L "$ROOT/tests" \
-l "$ROOT/tests/ekp-tests.el" \
-l "$ROOT/tests/ekp-region-tests.el" \
-l "$ROOT/tests/ekp-gui-tests.el" \
-l "$ROOT/tests/ekp-c-tests.el" \
-f ert-run-tests-batch-and-exit
;;
--random-order)
exec "$EMACS" -Q --batch -L "$ROOT" -L "$ROOT/tests" \
-l "$ROOT/tests/ekp-tests.el" \
-l "$ROOT/tests/ekp-region-tests.el" \
-l "$ROOT/tests/ekp-gui-tests.el" \
-l "$ROOT/tests/ekp-c-tests.el" \
-l "$ROOT/tests/run-tests-random-order.el" \
-f ekp-tests-run-random-order
;;
*)
echo "usage: $0 [path-to-emacs] [--random-order]" >&2
exit 2
;;
esac