Page MenuHomePhabricator

bench: Remove requirement that all benches use same testing setup
ClosedPublic

Authored by PiRK on Jan 22 2021, 14:19.

Details

Summary

The benches have always set up one global testing setup. This makes it hard to pick no testing setup at all or one with different params.

Fix this by removing any global state setup from the main bench.cpp and leave the setup to each individual bench.

One reason to have one global testing setup is to set the datadir location to a tempdir to avoid reading or writing in the default datadir location. But #13687 should prevent this already.

Commit fab117096446ab63d1f38c1ef6edbc94a5d4ab52

bench: Remove requirement that all benches use RegTestingSetup

Commit fa1fdb02fccd0f670f7b08ee61c249f04d0db17f

bench: Replace ::mempool globabl with test_setup.mempool
This is a refactor, since they are aliases for each other

This is a backport of Core PR18575

The changes in verify_script.cpp are not relevant to ABC.

Test Plan

ninja all && src/bench/bitcoin-bench