Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .mise/tasks/test
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ set -euo pipefail
# on a loaded machine.
specs=("$@")
(($#)) || specs=(tests/)
# A spec nvim signalled inside vim.fn.system() hangs in exit teardown, deaf to SIGTERM,
# and outlives the run. || true: under set -e a no-match would become the exit status.
trap 'pkill -KILL -g 0 -f "PlenaryBustedDirectory|plenary[.]busted" || true' EXIT
trap 'exit 1' HUP INT TERM
status=0
for spec in "${specs[@]}"; do
# Backgrounded: bash runs a trap only after its foreground child exits.
nvim --headless --noplugin -u tests/minimal_init.lua \
-c "PlenaryBustedDirectory $spec {minimal_init = 'tests/minimal_init.lua', timeout = 120000}" || status=1
-c "PlenaryBustedDirectory $spec {minimal_init = 'tests/minimal_init.lua', timeout = 120000}" &
wait $! || status=1
done
exit "$status"
Loading