Handing Ctrl+C in test harness #83326
Labels
A-libtest
Area: `#[test]` / the `test` library
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
Right now, sending a Ctrl+C (SIGINT) as the test harness runs simply runs the default signal handler from the OS, which ends the process as soon as possible. It would be more ideal to handle this signal and end the harness more gracefully. Here's sort of what I have in mind:
Note that the second ctrl+C is only useful if more than one thread is running or if there are fewer hanging tests than running threads, but it seems reasonable to cover the case where one thread is hanging but the rest have finished.
Note that right now, this would require relying on an external crate like
ctrlc
since there's no built-in Rust way to do this, but I think that adding this option at least on platforms that support it would be extremely helpful.The text was updated successfully, but these errors were encountered: