The ctest target bench_sanity_check
has many issues:
- With sanitizers enabled, it is one of the slowest targets, often taking several minutes. See #32770 (comment).
- There is no insight from ctest into how long each individual sanity check takes.
- Places that can’t use ctest (like the Windows-cross CI task) have to explicitly run it, or risk forgetting to run it.
- All benchmarks are run sequentially, when they could run in parallel instead.
Both issues can lead to CI timeouts and leave CPU unused during testing.
Fix all issues by running it as part of the functional tests instead. This is similar to the rpcauth tests (https://github.com/bitcoin/bitcoin/pull/32881) and util tests [bitcoin-tx, and bitcoin-util] (https://github.com/bitcoin/bitcoin/pull/32697).