946feb3f1ftest: remove redundant test suite uniqueness lint (Lőrinc) Pull request description: Follow-up to https://github.com/bitcoin/bitcoin/pull/35451#discussion_r3403672298. **Problem:** That duplicate check in `test/lint/lint-tests.py` is redundant now: CMake already registers each Boost test suite as a CTest test name and rejects duplicates there. **Fix:** Remove the `check_unique_test_names` path and its now-unused duplicate helper and inline remaining helper into `main()`. **Reproducers:** These throwaway patches pass `test/lint/lint-tests.py` and fail during CMake test registration. <details><summary>Internal `src/test` duplicate</summary> ```diff diff --git a/src/test/base32_tests.cpp b/src/test/base32_tests.cpp index 051a8fcd25..3b50bff724 100644 --- a/src/test/base32_tests.cpp +++ b/src/test/base32_tests.cpp @@ -54,3 +54,7 @@ BOOST_AUTO_TEST_CASE(base32_padding) } BOOST_AUTO_TEST_SUITE_END() + +BOOST_AUTO_TEST_SUITE(base32_tests) +BOOST_AUTO_TEST_CASE(base32_duplicate_probe) { BOOST_CHECK(true); } +BOOST_AUTO_TEST_SUITE_END() ``` </details> <details><summary>Internal `src/wallet/test` duplicate</summary> ```diff diff --git a/src/wallet/test/wallet_rpc_tests.cpp b/src/wallet/test/wallet_rpc_tests.cpp index 8bf5eab443..854d010ec0 100644 --- a/src/wallet/test/wallet_rpc_tests.cpp +++ b/src/wallet/test/wallet_rpc_tests.cpp @@ -37,5 +37,10 @@ BOOST_AUTO_TEST_CASE(ensure_unique_wallet_name) BOOST_CHECK_THROW(TestWalletName("/wallet/foobar", "foo"), UniValue); } +BOOST_AUTO_TEST_SUITE_END() + +BOOST_FIXTURE_TEST_SUITE(wallet_rpc_tests, BasicTestingSetup) +BOOST_AUTO_TEST_CASE(wallet_rpc_duplicate_probe) { BOOST_CHECK(true); } + BOOST_AUTO_TEST_SUITE_END() } // namespace wallet ``` </details> <details><summary>Cross `src/test` and `src/wallet/test` duplicate</summary> ```diff diff --git a/src/wallet/test/CMakeLists.txt b/src/wallet/test/CMakeLists.txt index 524c7218f4..04628e0327 100644 --- a/src/wallet/test/CMakeLists.txt +++ b/src/wallet/test/CMakeLists.txt @@ -8,6 +8,7 @@ target_sources(test_bitcoin PRIVATE init_test_fixture.cpp wallet_test_fixture.cpp + base32_tests.cpp db_tests.cpp coinselector_tests.cpp coinselection_tests.cpp diff --git a/src/wallet/test/base32_tests.cpp b/src/wallet/test/base32_tests.cpp new file mode 100644 index 0000000000..da91d87dca --- /dev/null +++ b/src/wallet/test/base32_tests.cpp @@ -0,0 +1,5 @@ +#include <boost/test/unit_test.hpp> + +BOOST_AUTO_TEST_SUITE(base32_tests) +BOOST_AUTO_TEST_CASE(wallet_cross_duplicate_probe) { BOOST_CHECK(true); } +BOOST_AUTO_TEST_SUITE_END() ``` </details> The CMake failures are in the form: ```text CMake Error at src/test/CMakeLists.txt:199 (add_test): add_test given test NAME "<duplicate_suite>" which already exists in this directory. ``` ACKs for top commit: maflcko: lgtm ACK946feb3f1fsedited: ACK946feb3f1fTree-SHA512: a511507d21db142b3f2ed6e966d9e8f1e7016e750de122d88f4502edc84c0cfc696054e757bf905ca58d9774ad6263b2a59ec8cbbcc1f3e28ed1896ba4cdd8aa
Bitcoin Core integration/staging tree
For an immediately usable, binary version of the Bitcoin Core software, see https://bitcoincore.org/en/download/.
What is Bitcoin Core?
Bitcoin Core connects to the Bitcoin peer-to-peer network to download and fully validate blocks and transactions. It also includes a wallet and graphical user interface, which can be optionally built.
Further information about Bitcoin Core is available in the doc folder.
License
Bitcoin Core is released under the terms of the MIT license. See COPYING for more information or see https://opensource.org/license/MIT.
Development Process
The master branch is regularly built (see doc/build-*.md for instructions) and tested, but it is not guaranteed to be
completely stable. Tags are created
regularly from release branches to indicate new official, stable release versions of Bitcoin Core.
The https://github.com/bitcoin-core/gui repository is used exclusively for the development of the GUI. Its master branch is identical in all monotree repositories. Release branches and tags do not exist, so please do not fork that repository unless it is for development reasons.
The contribution workflow is described in CONTRIBUTING.md and useful hints for developers can be found in doc/developer-notes.md.
Testing
Testing and code review is the bottleneck for development; we get more pull requests than we can review and test on short notice. Please be patient and help out by testing other people's pull requests, and remember this is a security-critical project where any mistake might cost people lots of money.
Automated Testing
Developers are strongly encouraged to write unit tests for new code, and to
submit new unit tests for old code. Unit tests can be compiled and run
(assuming they weren't disabled during the generation of the build system) with: ctest. Further details on running
and extending unit tests can be found in /src/test/README.md.
There are also regression and integration tests, written
in Python.
These tests can be run (if the test dependencies are installed) with: build/test/functional/test_runner.py
(assuming build is your build directory).
The CI (Continuous Integration) systems make sure that every pull request is tested on Windows, Linux, and macOS. The CI must pass on all commits before merge to avoid unrelated CI failures on new pull requests.
Manual Quality Assurance (QA) Testing
Changes should be tested by somebody other than the developer who wrote the code. This is especially important for large or high-risk changes. It is useful to add a test plan to the pull request description if testing the changes is not straightforward.
Translations
Changes to translations as well as new translations can be submitted to Bitcoin Core's Transifex page.
Translations are periodically pulled from Transifex and merged into the git repository. See the translation process for details on how this works.
Important: We do not accept translation changes as GitHub pull requests because the next pull from Transifex would automatically overwrite them again.