Integration of property based testing into Bitcoin ABC
Summary:
This is an initial integration of the rapidcheck property based tests.
The original test has been slightly modified to adapt to our codebase.
The feature has been added to CMake and the documentation updated
accordingly.
Note that as opposed to autotools, which enables the test automatically
if rapidcheck is installed, it is disabled by default with cmake and
requires a flag to be set by the user.
Backport of core PR12775, PR16622 and PR16645.
Test Plan:
Read the doc and install rapidcheck.
../configure
Ensure that rapidcheck is used by looking at the summary.
make check
Ensure there is no regression:
cmake -GNinja .. ninja check cmake -GNinja .. -DENABLE_PROPERTY_BASED_TESTS=ON
Check in the output that rapidcheck is enabled by searching for a
couple lines similar to:
-- Found Rapidcheck: /usr/local/include -- Found Rapidcheck: /usr/local/lib/librapidcheck.a
ninja check
Assuming you are running a 64-bit Linux machine:
cd depends RAPIDCHECK=1 make build-linux64
Check the rapidcheck package is built.
cd .. && mkdir buildLinux64 && cd buildLinux64 cmake -GNinja .. \ -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux64.cmake \ -DENABLE_PROPERTY_BASED_TESTS=ON
Check the rapidcheck lib found is the one from the depends.
ninja check
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D5323