test: remove BasicTestingSetup from unit tests that don’t need it #22086

pull fanquake wants to merge 16 commits into bitcoin:master from fanquake:remove_unneeded_test_setup changing 16 files +36 −30
  1. fanquake commented at 1:17 pm on May 27, 2021: member
    • Less setup/overhead for tests that don’t need it. Some naive bench-marking would suggest that a full test_bitcoin run is a few % faster after this change.
    • Tests which don’t need the BasicTestingSetup can’t accidentally end up depending on it somehow.
    • Already the case in at least the scheduler and block_filter tests.

    This adds missing includes, but more significant is the removal of setup_common.h from tests where it isn’t needed. This saves recompiling those tests when changes are made in the header.

  2. fanquake added the label Tests on May 27, 2021
  3. practicalswift commented at 9:23 pm on May 27, 2021: contributor
    Concept ACK
  4. fanquake force-pushed on May 28, 2021
  5. fanquake force-pushed on May 28, 2021
  6. test: remove BasicTestingSetup from allocator unit tests 883a5c7d02
  7. test: remove BasicTestingSetup from amount unit tests 05590651a0
  8. test: remove BasicTestingSetup from arith_uint256 unit tests 4c389ba04b
  9. test: remove BasicTestingSetup from base32 unit tests fd144f6426
  10. test: remove BasicTestingSetup from base64 unit tests f4dcbe4498
  11. test: remove BasicTestingSetup from bech32 unit tests a13dc24831
  12. test: remove BasicTestingSetup from bswap unit tests 6d3b78c0e2
  13. test: remove BasicTestingSetup from compilerbug unit tests 39cec22935
  14. test: remove BasicTestingSetup from hash unit tests cd5bc4b470
  15. test: remove BasicTestingSetup from merkleblock tests 3974c962b6
  16. test: remove BasicTestingSetup from policy_fee unit tests 57ba949ef5
  17. test: remove BasicTestingSetup from reverse_lock unit tests 1aee83421f
  18. test: remove BasicTestingSetup from sync unit tests ef8bb0473b
  19. test: remove BasicTestingSetup from torcontrol unit tests c0497a4928
  20. test: remove BasicTestingSetup from uint256 unit tests b53d3c1b1f
  21. test: remove BasicTestingSetup from util_threadnames unit tests 6c3fcd5591
  22. fanquake force-pushed on May 28, 2021
  23. practicalswift commented at 3:13 pm on May 28, 2021: contributor
    cr ACK 6c3fcd5591eb9947f35483014ecb0d8ab217b780: patch looks correct
  24. theStack commented at 3:59 pm on May 28, 2021: member
    Concept ACK
  25. laanwj commented at 2:44 pm on June 2, 2021: member
    ACK 6c3fcd5591eb9947f35483014ecb0d8ab217b780
  26. laanwj merged this on Jun 2, 2021
  27. laanwj closed this on Jun 2, 2021

  28. fanquake deleted the branch on Jun 3, 2021
  29. MarcoFalke commented at 6:17 am on June 3, 2021: member

    Nice.

    In the future we could consider removing BOOST_FIXTURE_TEST_SUITE completely and letting the tests pick their specific modules that they need from the node setup.

  30. sidhujag referenced this in commit 55bb627402 on Jun 3, 2021
  31. gwillen referenced this in commit e0b40dae0d on Jun 1, 2022
  32. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-03-31 12:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me