Skip to content

Commit faec282

Browse files
author
MarcoFalke
committed
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-
1 parent 7967104 commit faec282

File tree

101 files changed

+126
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+126
-126
lines changed

build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
1111
</PropertyGroup>
1212
<ItemGroup>
13-
<ClCompile Include="..\..\src\test\setup_common.cpp" />
13+
<ClCompile Include="..\..\src\test\util\setup_common.cpp" />
1414
<ClCompile Include="..\..\src\qt\test\addressbooktests.cpp" />
1515
<ClCompile Include="..\..\src\qt\test\apptests.cpp" />
1616
<ClCompile Include="..\..\src\qt\test\compattests.cpp" />

build_msvc/test_bitcoin/test_bitcoin.vcxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<ClCompile Include="..\..\src\test\*_properties.cpp" />
1414
<ClCompile Include="..\..\src\test\gen\*_gen.cpp" />
1515
<ClCompile Include="..\..\src\wallet\test\*_tests.cpp" />
16-
<ClCompile Include="..\..\src\test\lib\*.cpp" />
17-
<ClCompile Include="..\..\src\test\setup_common.cpp" />
16+
<ClCompile Include="..\..\src\test\util\*.cpp" />
17+
<ClCompile Include="..\..\src\test\util\setup_common.cpp" />
1818
<ClCompile Include="..\..\src\test\main.cpp" />
1919
<ClCompile Include="..\..\src\wallet\test\*_fixture.cpp" />
2020
</ItemGroup>

src/Makefile.bench.include

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ bench_bench_bitcoin_SOURCES = \
4040
bench/lockedpool.cpp \
4141
bench/poly1305.cpp \
4242
bench/prevector.cpp \
43-
test/lib/transaction_utils.h \
44-
test/lib/transaction_utils.cpp \
45-
test/setup_common.h \
46-
test/setup_common.cpp \
43+
test/util/transaction_utils.h \
44+
test/util/transaction_utils.cpp \
45+
test/util/setup_common.h \
46+
test/util/setup_common.cpp \
4747
test/util.h \
4848
test/util.cpp
4949

src/Makefile.qttest.include

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ TEST_QT_H = \
2727
qt/test/wallettests.h
2828

2929
TEST_BITCOIN_CPP = \
30-
test/setup_common.cpp
30+
test/util/setup_common.cpp
3131

3232
TEST_BITCOIN_H = \
33-
test/setup_common.h
33+
test/util/setup_common.h
3434

3535
qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
3636
$(QT_INCLUDES) $(QT_TEST_INCLUDES)

src/Makefile.test.include

+10-10
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,24 @@ RAW_TEST_FILES =
5757
GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
5858

5959
BITCOIN_TEST_SUITE = \
60-
test/lib/blockfilter.cpp \
61-
test/lib/blockfilter.h \
62-
test/lib/logging.cpp \
63-
test/lib/logging.h \
64-
test/lib/transaction_utils.cpp \
65-
test/lib/transaction_utils.h \
60+
test/util/blockfilter.cpp \
61+
test/util/blockfilter.h \
62+
test/util/logging.cpp \
63+
test/util/logging.h \
64+
test/util/transaction_utils.cpp \
65+
test/util/transaction_utils.h \
6666
test/main.cpp \
67-
test/setup_common.h \
68-
test/setup_common.cpp \
67+
test/util/setup_common.h \
68+
test/util/setup_common.cpp \
6969
test/util/str.h \
7070
test/util/str.cpp
7171

7272
FUZZ_SUITE = \
7373
test/fuzz/fuzz.cpp \
7474
test/fuzz/fuzz.h \
7575
test/fuzz/FuzzedDataProvider.h \
76-
test/setup_common.cpp \
77-
test/setup_common.h \
76+
test/util/setup_common.cpp \
77+
test/util/setup_common.h \
7878
test/util/str.cpp \
7979
test/util/str.h
8080

src/bench/bench.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <bench/bench.h>
66

77
#include <chainparams.h>
8-
#include <test/setup_common.h>
8+
#include <test/util/setup_common.h>
99
#include <validation.h>
1010

1111
#include <algorithm>

src/bench/verify_script.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <script/script.h>
1111
#include <script/standard.h>
1212
#include <streams.h>
13-
#include <test/lib/transaction_utils.h>
13+
#include <test/util/transaction_utils.h>
1414

1515
#include <array>
1616

src/qt/test/addressbooktests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <qt/test/addressbooktests.h>
22
#include <qt/test/util.h>
3-
#include <test/setup_common.h>
3+
#include <test/util/setup_common.h>
44

55
#include <interfaces/chain.h>
66
#include <interfaces/node.h>

src/qt/test/apptests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <qt/networkstyle.h>
1212
#include <qt/rpcconsole.h>
1313
#include <shutdown.h>
14-
#include <test/setup_common.h>
14+
#include <test/util/setup_common.h>
1515
#include <univalue.h>
1616
#include <validation.h>
1717

src/qt/test/rpcnestedtests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <interfaces/node.h>
88
#include <rpc/server.h>
99
#include <qt/rpcconsole.h>
10-
#include <test/setup_common.h>
10+
#include <test/util/setup_common.h>
1111
#include <univalue.h>
1212
#include <util/system.h>
1313

src/qt/test/test_main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <qt/test/rpcnestedtests.h>
1313
#include <qt/test/uritests.h>
1414
#include <qt/test/compattests.h>
15-
#include <test/setup_common.h>
15+
#include <test/util/setup_common.h>
1616

1717
#ifdef ENABLE_WALLET
1818
#include <qt/test/addressbooktests.h>

src/qt/test/wallettests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <qt/transactionview.h>
1414
#include <qt/walletmodel.h>
1515
#include <key_io.h>
16-
#include <test/setup_common.h>
16+
#include <test/util/setup_common.h>
1717
#include <validation.h>
1818
#include <wallet/wallet.h>
1919
#include <qt/overviewpage.h>

src/test/addrman_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44
#include <addrman.h>
5-
#include <test/setup_common.h>
5+
#include <test/util/setup_common.h>
66
#include <string>
77
#include <boost/test/unit_test.hpp>
88

src/test/allocator_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <util/memory.h>
66
#include <util/system.h>
77

8-
#include <test/setup_common.h>
8+
#include <test/util/setup_common.h>
99

1010
#include <memory>
1111

src/test/amount_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <amount.h>
66
#include <policy/feerate.h>
7-
#include <test/setup_common.h>
7+
#include <test/util/setup_common.h>
88

99
#include <boost/test/unit_test.hpp>
1010

src/test/arith_uint256_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <uint256.h>
1212
#include <arith_uint256.h>
1313
#include <string>
14-
#include <test/setup_common.h>
14+
#include <test/util/setup_common.h>
1515

1616
BOOST_FIXTURE_TEST_SUITE(arith_uint256_tests, BasicTestingSetup)
1717

src/test/base32_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#include <util/strencodings.h>
6-
#include <test/setup_common.h>
6+
#include <test/util/setup_common.h>
77

88
#include <boost/test/unit_test.hpp>
99

src/test/base58_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <test/data/base58_encode_decode.json.h>
66

77
#include <base58.h>
8-
#include <test/setup_common.h>
8+
#include <test/util/setup_common.h>
99
#include <util/strencodings.h>
1010

1111
#include <univalue.h>

src/test/base64_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#include <util/strencodings.h>
6-
#include <test/setup_common.h>
6+
#include <test/util/setup_common.h>
77

88
#include <boost/test/unit_test.hpp>
99

src/test/bech32_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#include <bech32.h>
6-
#include <test/setup_common.h>
6+
#include <test/util/setup_common.h>
77
#include <test/util/str.h>
88

99
#include <boost/test/unit_test.hpp>

src/test/bip32_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <key_io.h>
1010
#include <streams.h>
1111
#include <util/strencodings.h>
12-
#include <test/setup_common.h>
12+
#include <test/util/setup_common.h>
1313

1414
#include <string>
1515
#include <vector>

src/test/blockchain_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <chain.h>
66
#include <rpc/blockchain.h>
7-
#include <test/setup_common.h>
7+
#include <test/util/setup_common.h>
88

99
/* Equality between doubles is imprecise. Comparison should be done
1010
* with a small threshold of tolerance, rather than exact equality.

src/test/blockencodings_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <pow.h>
99
#include <streams.h>
1010

11-
#include <test/setup_common.h>
11+
#include <test/util/setup_common.h>
1212

1313
#include <boost/test/unit_test.hpp>
1414

src/test/blockfilter_index_tests.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include <miner.h>
1010
#include <pow.h>
1111
#include <script/standard.h>
12-
#include <test/lib/blockfilter.h>
13-
#include <test/setup_common.h>
12+
#include <test/util/blockfilter.h>
13+
#include <test/util/setup_common.h>
1414
#include <util/time.h>
1515
#include <validation.h>
1616

src/test/blockfilter_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#include <test/data/blockfilters.json.h>
6-
#include <test/setup_common.h>
6+
#include <test/util/setup_common.h>
77

88
#include <blockfilter.h>
99
#include <core_io.h>

src/test/bloom_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <uint256.h>
1616
#include <util/system.h>
1717
#include <util/strencodings.h>
18-
#include <test/setup_common.h>
18+
#include <test/util/setup_common.h>
1919

2020
#include <vector>
2121

src/test/bswap_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#include <compat/byteswap.h>
6-
#include <test/setup_common.h>
6+
#include <test/util/setup_common.h>
77

88
#include <boost/test/unit_test.hpp>
99

src/test/checkqueue_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <util/time.h>
88
#include <validation.h>
99

10-
#include <test/setup_common.h>
10+
#include <test/util/setup_common.h>
1111
#include <checkqueue.h>
1212
#include <boost/test/unit_test.hpp>
1313
#include <boost/thread.hpp>

src/test/coins_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <coins.h>
88
#include <script/standard.h>
99
#include <streams.h>
10-
#include <test/setup_common.h>
10+
#include <test/util/setup_common.h>
1111
#include <uint256.h>
1212
#include <undo.h>
1313
#include <util/strencodings.h>

src/test/compilerbug_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <test/setup_common.h>
5+
#include <test/util/setup_common.h>
66
#include <boost/test/unit_test.hpp>
77

88
BOOST_FIXTURE_TEST_SUITE(compilerbug_tests, BasicTestingSetup)

src/test/compress_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#include <compressor.h>
6-
#include <test/setup_common.h>
6+
#include <test/util/setup_common.h>
77
#include <script/standard.h>
88

99
#include <stdint.h>

src/test/crypto_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <crypto/sha512.h>
1616
#include <random.h>
1717
#include <util/strencodings.h>
18-
#include <test/setup_common.h>
18+
#include <test/util/setup_common.h>
1919

2020
#include <vector>
2121

src/test/cuckoocache_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <boost/test/unit_test.hpp>
55
#include <cuckoocache.h>
66
#include <script/sigcache.h>
7-
#include <test/setup_common.h>
7+
#include <test/util/setup_common.h>
88
#include <random.h>
99
#include <thread>
1010

src/test/dbwrapper_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <dbwrapper.h>
66
#include <uint256.h>
7-
#include <test/setup_common.h>
7+
#include <test/util/setup_common.h>
88
#include <util/memory.h>
99

1010
#include <memory>

src/test/denialofservice_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <util/time.h>
1818
#include <validation.h>
1919

20-
#include <test/setup_common.h>
20+
#include <test/util/setup_common.h>
2121

2222
#include <stdint.h>
2323

src/test/descriptor_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <string>
77
#include <script/sign.h>
88
#include <script/standard.h>
9-
#include <test/setup_common.h>
9+
#include <test/util/setup_common.h>
1010
#include <boost/test/unit_test.hpp>
1111
#include <script/descriptor.h>
1212
#include <util/strencodings.h>

src/test/flatfile_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <clientversion.h>
66
#include <flatfile.h>
77
#include <streams.h>
8-
#include <test/setup_common.h>
8+
#include <test/util/setup_common.h>
99
#include <util/system.h>
1010

1111
#include <boost/test/unit_test.hpp>

src/test/fs_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44
//
55
#include <fs.h>
6-
#include <test/setup_common.h>
6+
#include <test/util/setup_common.h>
77
#include <util/system.h>
88

99
#include <boost/test/unit_test.hpp>

src/test/getarg_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <util/strencodings.h>
66
#include <util/system.h>
7-
#include <test/setup_common.h>
7+
#include <test/util/setup_common.h>
88

99
#include <string>
1010
#include <utility>

src/test/hash_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <crypto/siphash.h>
77
#include <hash.h>
88
#include <util/strencodings.h>
9-
#include <test/setup_common.h>
9+
#include <test/util/setup_common.h>
1010

1111
#include <boost/test/unit_test.hpp>
1212

0 commit comments

Comments
 (0)