test: Unify testing setups for fuzz, bench, and unit tests#15788
test: Unify testing setups for fuzz, bench, and unit tests#15788maflcko merged 4 commits intobitcoin:masterfrom
Conversation
|
Concept ACK Nice! |
-BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/test_bitcoin\.(h|cpp)/setup_common.\1/g' $(git grep -l test_bitcoin) git mv ./src/test/test_bitcoin.h ./src/test/setup_common.h git mv ./src/test/test_bitcoin.cpp ./src/test/setup_common.cpp sed -i -e 's/BITCOIN_TEST_TEST_BITCOIN_H/BITCOIN_TEST_SETUP_COMMON_H/g' ./src/test/setup_common.h -END VERIFY SCRIPT-
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./src/bench/ ./contrib/devtools/copyright_header.py update ./src/test/ -END VERIFY SCRIPT-
jonatack
left a comment
There was a problem hiding this comment.
ACK faf4000
Reviewed changes, recompiled, ran unit tests and benchmarks. Todo: Run fuzzing.
|
FWIW I haven't managed to get the fuzzing to run as per |
|
Fuzzing shouldn't be changed by this pr, but it would help if you posted your configure line (and config log) as well as the output of make. See also doc/fuzzing |
faf4000 scripted-diff: Bump copyright headers in test, bench (MarcoFalke) fa82190 scripted-diff: Rename test_bitcoin to test/setup_common (MarcoFalke) fa8685d test: Use test_bitcoin setup in bench, Add test utils (MarcoFalke) 666696b test: Have segwit always active in (Basic)TestingSetup (MarcoFalke) Pull request description: Now that the fuzz tests can use the BasicTestingSetup [1], do the same for bench. Also move some duplicate code to a common "test/util" module. [1]: fuzz: Link BasicTestingSetup (shared with unit tests) #15504 ACKs for commit faf400: jonatack: ACK faf4000 Tree-SHA512: 8ac5692e72cf50e460958f291643ae6b8bb04d5c1331ed50dce9eb4e9457e5a925144c532c42b360a26707e11eeece74aab27db8c76ab9a429b9dd7167e7cdc4
…_tests 89e8df1 tests: fix outdate include in blockfilter_index_tests (James O'Beirne) Pull request description: Build is currently failing due to bad merge of bitcoin#15788 and bitcoin#14121. ACKs for commit 89e8df: fanquake: tACK 89e8df1 Tree-SHA512: d3fea861f80d660b4a2827ca7241237311b68de4175d3db938a9a1d538e1325822410c98d84ba0734208af8163fbcc42cf2732788311ea22f3834c95eeb330b8
Summary: Original script: ``` -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./src/bench/ ./contrib/devtools/copyright_header.py update ./src/test/ -END VERIFY SCRIPT- ``` Partial backport of core [[bitcoin/bitcoin#15788 | PR15788]]: bitcoin/bitcoin@faf4000 Bench files only for ease of review. Test Plan: Check nothing but core's copyright year changed. Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D5495
Summary: Original script: ``` -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./src/bench/ ./contrib/devtools/copyright_header.py update ./src/test/ -END VERIFY SCRIPT- ``` Partial backport of core [[bitcoin/bitcoin#15788 | PR15788]]: bitcoin/bitcoin@faf4000 Subset of test files only for ease of review. Test Plan: Check nothing but core's copyright year changed. Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D5496
Summary: Original script: ``` -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./src/bench/ ./contrib/devtools/copyright_header.py update ./src/test/ -END VERIFY SCRIPT- ``` Partial backport of core [[bitcoin/bitcoin#15788 | PR15788]]: bitcoin/bitcoin@faf4000 Subset of test files only for ease of review. Test Plan: Check nothing but core's copyright year changed. Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D5497
Summary: ``` Now that the fuzz tests can use the BasicTestingSetup [1], do the same for bench. ``` Partial backport of core [[bitcoin/bitcoin#15788 | PR15788]]: bitcoin/bitcoin@fa8685d This is stripped down to using the test fixture for the benchmark, as we have no use for the utils for now. Depends on D5484. Test Plan: make make check ./src/bench/bench_bitcoin ninja ninja check ninja bench-bitcoin Reviewers: #bitcoin_abc, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Subscribers: jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D5493
Summary: Original replacement script: ``` -BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/test_bitcoin\.(h|cpp)/setup_common.\1/g' $(git grep -l test_bitcoin) git mv ./src/test/test_bitcoin.h ./src/test/setup_common.h git mv ./src/test/test_bitcoin.cpp ./src/test/setup_common.cpp sed -i -e 's/BITCOIN_TEST_TEST_BITCOIN_H/BITCOIN_TEST_SETUP_COMMON_H/g' ./src/test/setup_common.h -END VERIFY SCRIPT- ``` Partial backport of core [[bitcoin/bitcoin#15788 | PR15788]]: bitcoin/bitcoin@fa82190#diff-cbf056cfc6c760726f2dff1391fd37d8 Depends on D5493. This touches a lot of files, but is renaming only and unfortunately cannot be split without breaking the build. Test Plan: make make check ./src/bench/bench_bitcoin ninja ninja check ninja bench-bitcoin Reviewers: #bitcoin_abc, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Subscribers: jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D5494
Summary: Original script: ``` -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./src/bench/ ./contrib/devtools/copyright_header.py update ./src/test/ -END VERIFY SCRIPT- ``` Completes backport of core [[bitcoin/bitcoin#15788 | PR15788]]: bitcoin/bitcoin@faf4000 Depends on D5494. Subset of test files only for ease of review. Test Plan: Check nothing but core's copyright year changed. Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D5498
Summary: This is a backport of Core [[bitcoin/bitcoin#13219 | PR13219]] and [[bitcoin/bitcoin#13806 | PR13806]] . Due to many backport being done out of oder or improperly, this contains elements of [[bitcoin/bitcoin#15413 | PR15413]] and [[bitcoin/bitcoin#15788 | PR15788]] Test Plan: make check ./src/bench/bench_bitcoin Check that the new benchmark is run. Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D5848
Summary: test: Have segwit always active in (Basic)TestingSetup test: Use test_bitcoin setup in bench, Add test utils This is a partial bakport of Core [[bitcoin/bitcoin#15788 | PR15788]] . the original backport missed many bits. I did not port the RPC like method because they don't build for us and they are dead code. Depends on D5848 Test Plan: ninja all check-all Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D5849
Summary: Original replacement script: ``` -BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/test_bitcoin\.(h|cpp)/setup_common.\1/g' $(git grep -l test_bitcoin) git mv ./src/test/test_bitcoin.h ./src/test/setup_common.h git mv ./src/test/test_bitcoin.cpp ./src/test/setup_common.cpp sed -i -e 's/BITCOIN_TEST_TEST_BITCOIN_H/BITCOIN_TEST_SETUP_COMMON_H/g' ./src/test/setup_common.h -END VERIFY SCRIPT- ``` Partial backport of core [[bitcoin/bitcoin#15788 | PR15788]]: bitcoin/bitcoin@fa82190#diff-cbf056cfc6c760726f2dff1391fd37d8 Depends on D5493. This touches a lot of files, but is renaming only and unfortunately cannot be split without breaking the build. Test Plan: make make check ./src/bench/bench_bitcoin ninja ninja check ninja bench-bitcoin Reviewers: #bitcoin_abc, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Subscribers: jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D5494
Summary: This is a partial backport of Core [[bitcoin/bitcoin#15779 | PR15779]] : bitcoin/bitcoin@fa46ac3 Also include pieces of [[bitcoin/bitcoin#15788 | PR15788]] that previously were ignored becauseit was dead code. Test Plan: ninja all check-all Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D6236
Summary: ``` Now that the fuzz tests can use the BasicTestingSetup [1], do the same for bench. ``` Partial backport of core [[bitcoin/bitcoin#15788 | PR15788]]: bitcoin/bitcoin@fa8685d This is stripped down to using the test fixture for the benchmark, as we have no use for the utils for now. Depends on D5484. Test Plan: make make check ./src/bench/bench_bitcoin ninja ninja check ninja bench-bitcoin Reviewers: #bitcoin_abc, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Subscribers: jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D5493
Summary: This is a backport of Core [[bitcoin/bitcoin#13219 | PR13219]] and [[bitcoin/bitcoin#13806 | PR13806]] . Due to many backport being done out of oder or improperly, this contains elements of [[bitcoin/bitcoin#15413 | PR15413]] and [[bitcoin/bitcoin#15788 | PR15788]] Test Plan: make check ./src/bench/bench_bitcoin Check that the new benchmark is run. Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D5848
Summary: test: Have segwit always active in (Basic)TestingSetup test: Use test_bitcoin setup in bench, Add test utils This is a partial bakport of Core [[bitcoin/bitcoin#15788 | PR15788]] . the original backport missed many bits. I did not port the RPC like method because they don't build for us and they are dead code. Depends on D5848 Test Plan: ninja all check-all Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D5849 freetrader: added chain.h includes to bench.cpp and util.cpp as required by rebasing; thanks to Calin Culianu for the patch
Now that the fuzz tests can use the BasicTestingSetup [1], do the same for bench.
Also move some duplicate code to a common "test/util" module.
[1]: fuzz: Link BasicTestingSetup (shared with unit tests) #15504