From faec28252cf4f8e754c689a7a44fd421f631db50 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 5 Nov 2019 15:18:59 -0500 Subject: [PATCH] scripted-diff: test: Move setup_common to test library -BEGIN VERIFY SCRIPT- # Move files for f in $(git ls-files src/test/lib/); do git mv $f src/test/util/; done git mv src/test/setup_common.cpp src/test/util/ git mv src/test/setup_common.h src/test/util/ # Replace Windows paths sed -i -e 's|\\setup_common|\\util\\setup_common|g' $(git grep -l '\\setup_common') sed -i -e 's|src\\test\\lib\\|src\\test\\util\\|g' build_msvc/test_bitcoin/test_bitcoin.vcxproj # Everything else sed -i -e 's|/setup_common|/util/setup_common|g' $(git grep -l 'setup_common') sed -i -e 's|test/lib/|test/util/|g' $(git grep -l 'test/lib/') # Fix include guard sed -i -e 's|BITCOIN_TEST_SETUP_COMMON_H|BITCOIN_TEST_UTIL_SETUP_COMMON_H|g' ./src/test/util/setup_common.h sed -i -e 's|BITCOIN_TEST_LIB_|BITCOIN_TEST_UTIL_|g' $(git grep -l 'BITCOIN_TEST_LIB_') -END VERIFY SCRIPT- --- .../test_bitcoin-qt/test_bitcoin-qt.vcxproj | 2 +- build_msvc/test_bitcoin/test_bitcoin.vcxproj | 4 ++-- src/Makefile.bench.include | 8 ++++---- src/Makefile.qttest.include | 4 ++-- src/Makefile.test.include | 20 +++++++++---------- src/bench/bench.cpp | 2 +- src/bench/verify_script.cpp | 2 +- src/qt/test/addressbooktests.cpp | 2 +- src/qt/test/apptests.cpp | 2 +- src/qt/test/rpcnestedtests.cpp | 2 +- src/qt/test/test_main.cpp | 2 +- src/qt/test/wallettests.cpp | 2 +- src/test/addrman_tests.cpp | 2 +- src/test/allocator_tests.cpp | 2 +- src/test/amount_tests.cpp | 2 +- src/test/arith_uint256_tests.cpp | 2 +- src/test/base32_tests.cpp | 2 +- src/test/base58_tests.cpp | 2 +- src/test/base64_tests.cpp | 2 +- src/test/bech32_tests.cpp | 2 +- src/test/bip32_tests.cpp | 2 +- src/test/blockchain_tests.cpp | 2 +- src/test/blockencodings_tests.cpp | 2 +- src/test/blockfilter_index_tests.cpp | 4 ++-- src/test/blockfilter_tests.cpp | 2 +- src/test/bloom_tests.cpp | 2 +- src/test/bswap_tests.cpp | 2 +- src/test/checkqueue_tests.cpp | 2 +- src/test/coins_tests.cpp | 2 +- src/test/compilerbug_tests.cpp | 2 +- src/test/compress_tests.cpp | 2 +- src/test/crypto_tests.cpp | 2 +- src/test/cuckoocache_tests.cpp | 2 +- src/test/dbwrapper_tests.cpp | 2 +- src/test/denialofservice_tests.cpp | 2 +- src/test/descriptor_tests.cpp | 2 +- src/test/flatfile_tests.cpp | 2 +- src/test/fs_tests.cpp | 2 +- src/test/getarg_tests.cpp | 2 +- src/test/hash_tests.cpp | 2 +- src/test/key_io_tests.cpp | 2 +- src/test/key_properties.cpp | 2 +- src/test/key_tests.cpp | 2 +- src/test/limitedmap_tests.cpp | 2 +- src/test/logging_tests.cpp | 2 +- src/test/mempool_tests.cpp | 2 +- src/test/merkle_tests.cpp | 2 +- src/test/merkleblock_tests.cpp | 2 +- src/test/miner_tests.cpp | 2 +- src/test/multisig_tests.cpp | 2 +- src/test/net_tests.cpp | 2 +- src/test/netbase_tests.cpp | 2 +- src/test/pmt_tests.cpp | 2 +- src/test/policyestimator_tests.cpp | 2 +- src/test/pow_tests.cpp | 2 +- src/test/prevector_tests.cpp | 2 +- src/test/raii_event_tests.cpp | 2 +- src/test/random_tests.cpp | 2 +- src/test/reverselock_tests.cpp | 2 +- src/test/rpc_tests.cpp | 2 +- src/test/sanity_tests.cpp | 2 +- src/test/scheduler_tests.cpp | 2 +- src/test/script_p2sh_tests.cpp | 2 +- src/test/script_standard_tests.cpp | 2 +- src/test/script_tests.cpp | 4 ++-- src/test/scriptnum_tests.cpp | 2 +- src/test/serialize_tests.cpp | 2 +- src/test/sighash_tests.cpp | 2 +- src/test/sigopcount_tests.cpp | 2 +- src/test/skiplist_tests.cpp | 2 +- src/test/streams_tests.cpp | 2 +- src/test/sync_tests.cpp | 2 +- src/test/timedata_tests.cpp | 4 ++-- src/test/torcontrol_tests.cpp | 2 +- src/test/transaction_tests.cpp | 2 +- src/test/txindex_tests.cpp | 2 +- src/test/txvalidation_tests.cpp | 2 +- src/test/txvalidationcache_tests.cpp | 2 +- src/test/uint256_tests.cpp | 2 +- src/test/{lib => util}/blockfilter.cpp | 2 +- src/test/{lib => util}/blockfilter.h | 6 +++--- src/test/{lib => util}/logging.cpp | 2 +- src/test/{lib => util}/logging.h | 6 +++--- src/test/{ => util}/setup_common.cpp | 2 +- src/test/{ => util}/setup_common.h | 4 ++-- src/test/{lib => util}/transaction_utils.cpp | 2 +- src/test/{lib => util}/transaction_utils.h | 6 +++--- src/test/util_tests.cpp | 2 +- src/test/util_threadnames_tests.cpp | 2 +- src/test/validation_block_tests.cpp | 2 +- src/test/validation_tests.cpp | 2 +- src/test/versionbits_tests.cpp | 2 +- src/wallet/test/coinselector_tests.cpp | 2 +- src/wallet/test/db_tests.cpp | 2 +- src/wallet/test/init_test_fixture.h | 2 +- src/wallet/test/init_tests.cpp | 4 ++-- src/wallet/test/ismine_tests.cpp | 2 +- src/wallet/test/psbt_wallet_tests.cpp | 2 +- src/wallet/test/wallet_crypto_tests.cpp | 2 +- src/wallet/test/wallet_test_fixture.h | 2 +- src/wallet/test/wallet_tests.cpp | 2 +- 101 files changed, 126 insertions(+), 126 deletions(-) rename src/test/{lib => util}/blockfilter.cpp (95%) rename src/test/{lib => util}/blockfilter.h (73%) rename src/test/{lib => util}/logging.cpp (96%) rename src/test/{lib => util}/logging.h (85%) rename src/test/{ => util}/setup_common.cpp (99%) rename src/test/{ => util}/setup_common.h (98%) rename src/test/{lib => util}/transaction_utils.cpp (97%) rename src/test/{lib => util}/transaction_utils.h (84%) diff --git a/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj b/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj index 8e54bc7653698..bd9b6cc8dbb5a 100644 --- a/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj +++ b/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj @@ -10,7 +10,7 @@ $(SolutionDir)$(Platform)\$(Configuration)\ - + diff --git a/build_msvc/test_bitcoin/test_bitcoin.vcxproj b/build_msvc/test_bitcoin/test_bitcoin.vcxproj index 703f616f8e1cf..9240ce80bee3d 100644 --- a/build_msvc/test_bitcoin/test_bitcoin.vcxproj +++ b/build_msvc/test_bitcoin/test_bitcoin.vcxproj @@ -13,8 +13,8 @@ - - + + diff --git a/src/Makefile.bench.include b/src/Makefile.bench.include index fbcab86d8fd73..c9e4fcc4bcd80 100644 --- a/src/Makefile.bench.include +++ b/src/Makefile.bench.include @@ -40,10 +40,10 @@ bench_bench_bitcoin_SOURCES = \ bench/lockedpool.cpp \ bench/poly1305.cpp \ bench/prevector.cpp \ - test/lib/transaction_utils.h \ - test/lib/transaction_utils.cpp \ - test/setup_common.h \ - test/setup_common.cpp \ + test/util/transaction_utils.h \ + test/util/transaction_utils.cpp \ + test/util/setup_common.h \ + test/util/setup_common.cpp \ test/util.h \ test/util.cpp diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include index c309340fd7771..562b393b229df 100644 --- a/src/Makefile.qttest.include +++ b/src/Makefile.qttest.include @@ -27,10 +27,10 @@ TEST_QT_H = \ qt/test/wallettests.h TEST_BITCOIN_CPP = \ - test/setup_common.cpp + test/util/setup_common.cpp TEST_BITCOIN_H = \ - test/setup_common.h + test/util/setup_common.h qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \ $(QT_INCLUDES) $(QT_TEST_INCLUDES) diff --git a/src/Makefile.test.include b/src/Makefile.test.include index 742530c55c0af..6d2b546a281f8 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -57,15 +57,15 @@ RAW_TEST_FILES = GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h) BITCOIN_TEST_SUITE = \ - test/lib/blockfilter.cpp \ - test/lib/blockfilter.h \ - test/lib/logging.cpp \ - test/lib/logging.h \ - test/lib/transaction_utils.cpp \ - test/lib/transaction_utils.h \ + test/util/blockfilter.cpp \ + test/util/blockfilter.h \ + test/util/logging.cpp \ + test/util/logging.h \ + test/util/transaction_utils.cpp \ + test/util/transaction_utils.h \ test/main.cpp \ - test/setup_common.h \ - test/setup_common.cpp \ + test/util/setup_common.h \ + test/util/setup_common.cpp \ test/util/str.h \ test/util/str.cpp @@ -73,8 +73,8 @@ FUZZ_SUITE = \ test/fuzz/fuzz.cpp \ test/fuzz/fuzz.h \ test/fuzz/FuzzedDataProvider.h \ - test/setup_common.cpp \ - test/setup_common.h \ + test/util/setup_common.cpp \ + test/util/setup_common.h \ test/util/str.cpp \ test/util/str.h diff --git a/src/bench/bench.cpp b/src/bench/bench.cpp index 1b6b1736a98a7..cc159eb191f9c 100644 --- a/src/bench/bench.cpp +++ b/src/bench/bench.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include diff --git a/src/bench/verify_script.cpp b/src/bench/verify_script.cpp index c9947f192ee3e..1c025e29d3e1c 100644 --- a/src/bench/verify_script.cpp +++ b/src/bench/verify_script.cpp @@ -10,7 +10,7 @@ #include