Skip to content

Commit 46fc4d1

Browse files
author
MarcoFalke
committed
Merge #17384: test: Create new test library
fa4c6fa doc: Add documentation for new test/lib (MarcoFalke) faec282 scripted-diff: test: Move setup_common to test library (MarcoFalke) Pull request description: Sorry for clickbait, this is only a move-only scripted-diff commit and one documentation commit. Longer term, someone who knows something about build systems can make this an actual library. Motivation for this is that each module gets compiled for each target that includes it. For example, setup_common is compiled 27 times (for the fuzz suite) and another 3 times for the other tests (bench, unit test, gui) ACKs for top commit: practicalswift: ACK fa4c6fa -- diff looks correct and Travis is happy jonatack: ACK fa4c6fa with the reserve that the commit messages (and PR description) contain the motivation for this change. Built, ran tests, light code review. ryanofsky: Code review ACK fa4c6fa. I didn't realize `lib` was actually name of existing directory, not a new name. But in any case this looks good and nice to have one scripted diff instead of two. Tree-SHA512: 2e176df90c60578276e4a6dc83ff57ff59d8e666ecf30c5ceacb8c326725da91baa4cac3dfa7a2e1605f58122a3e3e27e4938ff33e3a0ce7ea53afffebbf57a4
2 parents e65b416 + fa4c6fa commit 46fc4d1

File tree

103 files changed

+139
-128
lines changed

Some content is hidden

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

103 files changed

+139
-128
lines changed

build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 10 additions & 10 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

0 commit comments

Comments
 (0)