diff options
author | fanquake <fanquake@gmail.com> | 2023-04-21 11:04:26 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-04-21 11:19:08 +0100 |
commit | 669af326329b01a739aa5ee79c2e8002818fa4cc (patch) | |
tree | c40fe3188f52938875b3404ee7dcbd232ab21db2 /src/test | |
parent | 4c40837a454996c9f704ebf060efd6b249f2e362 (diff) | |
parent | be55f545d53d44fdcf2d8ae802e9eae551d120c6 (diff) |
Merge bitcoin/bitcoin#27419: move-only: Extract common/args from util/system
be55f545d53d44fdcf2d8ae802e9eae551d120c6 move-only: Extract common/args and common/config.cpp from util/system (TheCharlatan)
Pull request description:
This pull request is part of the `libbitcoinkernel` project https://github.com/bitcoin/bitcoin/issues/24303 https://github.com/bitcoin/bitcoin/projects/18 and more specifically its "Step 2: Decouple most non-consensus code from libbitcoinkernel". It is part of a series of patches splitting up the `util/system` files. Its preceding pull request is https://github.com/bitcoin/bitcoin/pull/27254.
The pull request contains an extraction of ArgsManager related functions from util/system into their own common/ file.
The background of this commit is an ongoing effort to decouple the libbitcoinkernel library from the ArgsManager. The ArgsManager belongs into the common library, since the kernel library should not depend on it. See [doc/design/libraries.md](https://github.com/bitcoin/bitcoin/blob/master/doc/design/libraries.md) for more information on this rationale.
ACKs for top commit:
MarcoFalke:
re-ACK be55f545d53d44fdcf2d8ae802e9eae551d120c6 🚲
ryanofsky:
Code review ACK be55f545d53d44fdcf2d8ae802e9eae551d120c6. Just small cleanups since the last review.
hebasto:
ACK be55f545d53d44fdcf2d8ae802e9eae551d120c6, I have reviewed the code and it looks OK, I agree it can be merged.
Tree-SHA512: 90eb03334af0155b823030b4f2ecf286d35058d700ee2ddbbaa445be19e31eb0fe982656f35bd14ecee3ad2c3d0db3746855cb8f3777eff7253713e42873e111
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/argsman_tests.cpp | 2 | ||||
-rw-r--r-- | src/test/checkqueue_tests.cpp | 2 | ||||
-rw-r--r-- | src/test/denialofservice_tests.cpp | 2 | ||||
-rw-r--r-- | src/test/flatfile_tests.cpp | 2 | ||||
-rw-r--r-- | src/test/fuzz/addrman.cpp | 2 | ||||
-rw-r--r-- | src/test/fuzz/banman.cpp | 2 | ||||
-rw-r--r-- | src/test/fuzz/connman.cpp | 2 | ||||
-rw-r--r-- | src/test/fuzz/deserialize.cpp | 2 | ||||
-rw-r--r-- | src/test/fuzz/i2p.cpp | 2 | ||||
-rw-r--r-- | src/test/fuzz/integer.cpp | 1 | ||||
-rw-r--r-- | src/test/fuzz/string.cpp | 1 | ||||
-rw-r--r-- | src/test/fuzz/system.cpp | 2 | ||||
-rw-r--r-- | src/test/fuzz/versionbits.cpp | 2 | ||||
-rw-r--r-- | src/test/getarg_tests.cpp | 3 | ||||
-rw-r--r-- | src/test/i2p_tests.cpp | 2 | ||||
-rw-r--r-- | src/test/net_tests.cpp | 2 | ||||
-rw-r--r-- | src/test/random_tests.cpp | 1 | ||||
-rw-r--r-- | src/test/settings_tests.cpp | 2 | ||||
-rw-r--r-- | src/test/util/setup_common.cpp | 1 | ||||
-rw-r--r-- | src/test/util/setup_common.h | 2 | ||||
-rw-r--r-- | src/test/validationinterface_tests.cpp | 2 |
21 files changed, 23 insertions, 16 deletions
diff --git a/src/test/argsman_tests.cpp b/src/test/argsman_tests.cpp index 5bade94f37..6a0925f0bb 100644 --- a/src/test/argsman_tests.cpp +++ b/src/test/argsman_tests.cpp @@ -2,6 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <common/args.h> #include <sync.h> #include <test/util/logging.h> #include <test/util/setup_common.h> @@ -9,7 +10,6 @@ #include <univalue.h> #include <util/fs.h> #include <util/strencodings.h> -#include <util/system.h> #include <array> #include <optional> diff --git a/src/test/checkqueue_tests.cpp b/src/test/checkqueue_tests.cpp index 6bc4770f9b..9011e703e8 100644 --- a/src/test/checkqueue_tests.cpp +++ b/src/test/checkqueue_tests.cpp @@ -3,10 +3,10 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <checkqueue.h> +#include <common/args.h> #include <sync.h> #include <test/util/random.h> #include <test/util/setup_common.h> -#include <util/system.h> #include <util/time.h> #include <boost/test/unit_test.hpp> diff --git a/src/test/denialofservice_tests.cpp b/src/test/denialofservice_tests.cpp index aca2b8eff0..1a06f16155 100644 --- a/src/test/denialofservice_tests.cpp +++ b/src/test/denialofservice_tests.cpp @@ -6,6 +6,7 @@ #include <banman.h> #include <chainparams.h> +#include <common/args.h> #include <net.h> #include <net_processing.h> #include <pubkey.h> @@ -17,7 +18,6 @@ #include <test/util/setup_common.h> #include <timedata.h> #include <util/string.h> -#include <util/system.h> #include <util/time.h> #include <validation.h> diff --git a/src/test/flatfile_tests.cpp b/src/test/flatfile_tests.cpp index 54c30ed314..3874b38f61 100644 --- a/src/test/flatfile_tests.cpp +++ b/src/test/flatfile_tests.cpp @@ -3,10 +3,10 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <clientversion.h> +#include <common/args.h> #include <flatfile.h> #include <streams.h> #include <test/util/setup_common.h> -#include <util/system.h> #include <boost/test/unit_test.hpp> diff --git a/src/test/fuzz/addrman.cpp b/src/test/fuzz/addrman.cpp index a59e41dbb5..5ad7a25c53 100644 --- a/src/test/fuzz/addrman.cpp +++ b/src/test/fuzz/addrman.cpp @@ -6,6 +6,7 @@ #include <addrman.h> #include <addrman_impl.h> #include <chainparams.h> +#include <common/args.h> #include <merkleblock.h> #include <random.h> #include <test/fuzz/FuzzedDataProvider.h> @@ -15,7 +16,6 @@ #include <test/util/setup_common.h> #include <time.h> #include <util/asmap.h> -#include <util/system.h> #include <cassert> #include <cstdint> diff --git a/src/test/fuzz/banman.cpp b/src/test/fuzz/banman.cpp index b4a93499ed..cb5d29d9b8 100644 --- a/src/test/fuzz/banman.cpp +++ b/src/test/fuzz/banman.cpp @@ -3,6 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <banman.h> +#include <common/args.h> #include <netaddress.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> @@ -11,7 +12,6 @@ #include <test/util/setup_common.h> #include <util/fs.h> #include <util/readwritefile.h> -#include <util/system.h> #include <cassert> #include <cstdint> diff --git a/src/test/fuzz/connman.cpp b/src/test/fuzz/connman.cpp index 7ce17c0b7c..0f3c850e66 100644 --- a/src/test/fuzz/connman.cpp +++ b/src/test/fuzz/connman.cpp @@ -5,6 +5,7 @@ #include <addrman.h> #include <chainparams.h> #include <chainparamsbase.h> +#include <common/args.h> #include <net.h> #include <netaddress.h> #include <protocol.h> @@ -13,7 +14,6 @@ #include <test/fuzz/util.h> #include <test/fuzz/util/net.h> #include <test/util/setup_common.h> -#include <util/system.h> #include <util/translation.h> #include <cstdint> diff --git a/src/test/fuzz/deserialize.cpp b/src/test/fuzz/deserialize.cpp index 7cd78e0461..177711c6e4 100644 --- a/src/test/fuzz/deserialize.cpp +++ b/src/test/fuzz/deserialize.cpp @@ -9,6 +9,7 @@ #include <blockfilter.h> #include <chain.h> #include <coins.h> +#include <common/args.h> #include <compressor.h> #include <consensus/merkle.h> #include <key.h> @@ -25,7 +26,6 @@ #include <streams.h> #include <test/util/setup_common.h> #include <undo.h> -#include <util/system.h> #include <version.h> #include <exception> diff --git a/src/test/fuzz/i2p.cpp b/src/test/fuzz/i2p.cpp index 6c2321cd68..3c6db96446 100644 --- a/src/test/fuzz/i2p.cpp +++ b/src/test/fuzz/i2p.cpp @@ -2,6 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <common/args.h> #include <i2p.h> #include <netaddress.h> #include <netbase.h> @@ -10,7 +11,6 @@ #include <test/fuzz/util.h> #include <test/fuzz/util/net.h> #include <test/util/setup_common.h> -#include <util/system.h> #include <util/threadinterrupt.h> void initialize_i2p() diff --git a/src/test/fuzz/integer.cpp b/src/test/fuzz/integer.cpp index c0aefe6067..ead877fe05 100644 --- a/src/test/fuzz/integer.cpp +++ b/src/test/fuzz/integer.cpp @@ -3,6 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <arith_uint256.h> +#include <common/args.h> #include <compressor.h> #include <consensus/amount.h> #include <consensus/merkle.h> diff --git a/src/test/fuzz/string.cpp b/src/test/fuzz/string.cpp index c7363f8f49..5de24a939d 100644 --- a/src/test/fuzz/string.cpp +++ b/src/test/fuzz/string.cpp @@ -4,6 +4,7 @@ #include <blockfilter.h> #include <clientversion.h> +#include <common/args.h> #include <common/url.h> #include <netbase.h> #include <outputtype.h> diff --git a/src/test/fuzz/system.cpp b/src/test/fuzz/system.cpp index dc3f9c8b8f..935f0c21e1 100644 --- a/src/test/fuzz/system.cpp +++ b/src/test/fuzz/system.cpp @@ -2,11 +2,11 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <common/args.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <test/fuzz/util.h> #include <test/util/setup_common.h> -#include <util/system.h> #include <cstdint> #include <string> diff --git a/src/test/fuzz/versionbits.cpp b/src/test/fuzz/versionbits.cpp index 143027662f..e6a19d6e91 100644 --- a/src/test/fuzz/versionbits.cpp +++ b/src/test/fuzz/versionbits.cpp @@ -4,9 +4,9 @@ #include <chain.h> #include <chainparams.h> +#include <common/args.h> #include <consensus/params.h> #include <primitives/block.h> -#include <util/system.h> #include <versionbits.h> #include <test/fuzz/FuzzedDataProvider.h> diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp index 9106040b84..715b6885f5 100644 --- a/src/test/getarg_tests.cpp +++ b/src/test/getarg_tests.cpp @@ -2,11 +2,12 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <common/args.h> +#include <logging.h> #include <test/util/setup_common.h> #include <univalue.h> #include <util/settings.h> #include <util/strencodings.h> -#include <util/system.h> #include <limits> #include <string> diff --git a/src/test/i2p_tests.cpp b/src/test/i2p_tests.cpp index 3e20b527b5..b2e1ae43be 100644 --- a/src/test/i2p_tests.cpp +++ b/src/test/i2p_tests.cpp @@ -2,13 +2,13 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <common/args.h> #include <i2p.h> #include <logging.h> #include <netaddress.h> #include <test/util/logging.h> #include <test/util/net.h> #include <test/util/setup_common.h> -#include <util/system.h> #include <util/threadinterrupt.h> #include <boost/test/unit_test.hpp> diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp index 4fbd9b3a6e..631c213627 100644 --- a/src/test/net_tests.cpp +++ b/src/test/net_tests.cpp @@ -4,6 +4,7 @@ #include <chainparams.h> #include <clientversion.h> +#include <common/args.h> #include <compat/compat.h> #include <cstdint> #include <net.h> @@ -19,7 +20,6 @@ #include <timedata.h> #include <util/strencodings.h> #include <util/string.h> -#include <util/system.h> #include <validation.h> #include <version.h> diff --git a/src/test/random_tests.cpp b/src/test/random_tests.cpp index e5cf767614..414e4509f5 100644 --- a/src/test/random_tests.cpp +++ b/src/test/random_tests.cpp @@ -5,6 +5,7 @@ #include <random.h> #include <test/util/setup_common.h> +#include <util/time.h> #include <boost/test/unit_test.hpp> diff --git a/src/test/settings_tests.cpp b/src/test/settings_tests.cpp index 4d0d42ae38..604eb48df6 100644 --- a/src/test/settings_tests.cpp +++ b/src/test/settings_tests.cpp @@ -10,10 +10,10 @@ #include <boost/test/unit_test.hpp> +#include <common/args.h> #include <univalue.h> #include <util/strencodings.h> #include <util/string.h> -#include <util/system.h> #include <fstream> #include <map> diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp index 58593c9d5b..80ad550717 100644 --- a/src/test/util/setup_common.cpp +++ b/src/test/util/setup_common.cpp @@ -44,6 +44,7 @@ #include <txmempool.h> #include <util/strencodings.h> #include <util/string.h> +#include <util/system.h> #include <util/thread.h> #include <util/threadnames.h> #include <util/time.h> diff --git a/src/test/util/setup_common.h b/src/test/util/setup_common.h index 948ebc097c..c576fc12c5 100644 --- a/src/test/util/setup_common.h +++ b/src/test/util/setup_common.h @@ -6,6 +6,7 @@ #define BITCOIN_TEST_UTIL_SETUP_COMMON_H #include <chainparamsbase.h> +#include <common/args.h> #include <key.h> #include <node/caches.h> #include <node/context.h> @@ -16,7 +17,6 @@ #include <util/check.h> #include <util/fs.h> #include <util/string.h> -#include <util/system.h> #include <util/vector.h> #include <functional> diff --git a/src/test/validationinterface_tests.cpp b/src/test/validationinterface_tests.cpp index ceba689e52..576768a625 100644 --- a/src/test/validationinterface_tests.cpp +++ b/src/test/validationinterface_tests.cpp @@ -10,6 +10,8 @@ #include <util/check.h> #include <validationinterface.h> +#include <atomic> + BOOST_FIXTURE_TEST_SUITE(validationinterface_tests, TestingSetup) struct TestSubscriberNoop final : public CValidationInterface { |