Print nextest-style cancellation banner on Ctrl+C#764
Open
MatthewMckee4 wants to merge 7 commits into
Open
Conversation
Merging this PR will not alter performance
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pressing Ctrl+C during a test run used to terminate karva with no
indication of what was cut short. The orchestrator now mirrors nextest:
when a SIGINT is received it prints
Cancelling due to interrupt: N tests still runningand, before killing each remaining worker, emits aSIGINT [duration] worker N (M tests)line in the same column layout asthe
PASS/FAILlines. The cancellation banner is only emitted ongenuine interrupts; fail-fast shutdowns continue to be silent at the
orchestrator level. The Ctrl+C handler is now installed at the top of
run_parallel_testsrather than after worker spawn so an early SIGINTduring collection or partitioning no longer slips through to the default
disposition.
Sample output:
The reported test count is per-worker (each worker's assigned partition
size). Workers only flush results to the cache on exit, so the
orchestrator can't see which individual tests have already completed
inside a still-running worker; the count is therefore an upper bound on
tests still in flight.
Test Plan
New unix-only integration test in
crates/karva/tests/it/cancel.rsspawns karva on a 60s-sleeping test, sends
SIGINTviakill -s INT,and asserts both the cancellation banner and a
SIGINTline appear instdout.
just testanduvx prek run -apass.