tests: speed up coins_tests by parallelizing

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.
This commit is contained in:
Anthony Towns
2025-07-11 18:10:49 +10:00
parent bad998b7c0
commit 06ab3a394a
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)