Merge bitcoin/bitcoin#32945: tests: speed up coins_tests by parallelizing

06ab3a394a tests: speed up coins_tests by parallelizing (Anthony Towns)

Pull request description:

  Updates the cmake logic to generate a separate test for each BOOST_FIXTURE_TEST_SUITE declaration in a file, and splits coins_tests.cpp into three separate suites so that they can be run in parallel. Also updates the convention enforced by test/lint/lint-tests.py.

ACKs for top commit:
  l0rinc:
    reACK 06ab3a394a
  maflcko:
    lgtm ACK 06ab3a394a
  achow101:
    ACK 06ab3a394a

Tree-SHA512: 940d9aa31dab60d1000b5f57d8dc4b2c5b4045c7e5c979ac407aba39f2285d53bc00c5e4d7bf2247551fd7e1c8681144e11fc8c005a874282c4c59bd362fb467
This commit is contained in:
Ava Chow
2025-07-22 11:19:18 -07:00
3 changed files with 21 additions and 11 deletions

View File

@@ -30,14 +30,14 @@ def check_matching_test_names(test_suite_list):
not_matching = [
x
for x in test_suite_list
if re.search(r"/(.*?)\.cpp:BOOST_FIXTURE_TEST_SUITE\(\1, .*\)", x) is None
if re.search(r"/(.*?)\.cpp:BOOST_FIXTURE_TEST_SUITE\(\1(_[a-z0-9]+)?, .*\)", x) is None
]
if len(not_matching) > 0:
not_matching = "\n".join(not_matching)
error_msg = (
"The test suite in file src/test/foo_tests.cpp should be named\n"
'"foo_tests". Please make sure the following test suites follow\n'
"that convention:\n\n"
'`foo_tests`, or if there are multiple test suites, `foo_tests_bar`.\n'
'Please make sure the following test suites follow that convention:\n\n'
f"{not_matching}\n"
)
print(error_msg)