mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-15 16:38:23 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user