As this has comes up sometimes, I wanted to create a thread for this.
However, when replacing the current unit test framework, it is unclear what alternative could be suitable. It doesn’t really make sense to drop one dependency and add a random other one.
When it comes to features that are currently missing, I recall only those so far:
- Boost Unit Test isn’t thread-safe, so
BOOST_CHECK(et al) can only be used from the main thread, not any spawned threads (ref #8670 (comment)) - There is no –fail-fast option, possibly even attaching gdb automatically (https://github.com/bitcoin/bitcoin/issues/8670#issuecomment-247083981)
Are there any other missing features?
If not, it may be easier to just implement our own thread-safe check macros, which abort to provide the fail-fast behavior? (I guess that catch_system_errors will have to be disabled for that somehow, not sure how to do that)