odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.13k stars 551 forks source link

add forced shutdown to new test runner #3725

Closed laytan closed 3 weeks ago

laytan commented 3 weeks ago

Currently, a Ctrl+c starts a graceful shutdown of the tests and runner. Sometimes tests get stuck and this would never complete.

This simply adds an extra step, if Ctrl+c is given for the second time, just os.exit right away.

Feoramund commented 3 weeks ago

I suspect the stalled thread is not being terminated properly, and the runner is joining with it. More rarely, it may have to do with the join issue I've mentioned before, depending on the platform in question.

The test runner is written to immediately terminate all threads upon that signal, then join with them. This will not work if thread termination is not implemented on a particular platform, like Darwin for example.