-
Notifications
You must be signed in to change notification settings - Fork 37.7k
doc: initial RapidCheck property-based testing documentation #16645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1f11597
to
093dfb1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK. Thanks for writing more documentation. Some of it seems a bit verbose. i.e I don't think we need a dump of the rapidcheck
build output in here (that's also likely to change, and wont look the same for everyone anyways). I left a few comments inline.
@Christewart I see you've seen this PR already, but would be good to get your review / thoughts as well.
093dfb1
to
8616c81
Compare
Thank you for reviewing @fanquake. Updated with your feedback and rebased. |
Looks good to me, thanks for adding documentation! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 8616c81 - Thanks for updating.
|
||
## Running | ||
|
||
If RapidCheck is installed, Bitcoin Core will automatically run the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to run these by default? This forces everyone to install rapidcheck. I think that is reasonable when we have a pre-configured way to easily install rapidcheck. AFAIK this isn't this case, unless I missed a PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, RapidCheck is auto-configured only if librapidcheck.a is detected, which IIUC doesn't force anyone to install it. I think this is outside the scope of the doc which addresses the current situation. FWIW I'm working on updating the RapidCheck Makefile to maybe/hopefully autobuild cleanly and can update this doc in that PR if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Rapidcheck auto-configure as seen in configure.ac:L134-138 and 1280-1292)
Thanks for reviewing!
…ation 8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack) Pull request description: This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10). The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md. ACKs for top commit: fanquake: ACK 8616c81 - Thanks for updating. Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
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 [[bitcoin/bitcoin#12775 | PR12775]], [[bitcoin/bitcoin#16622 | PR16622]] and [[bitcoin/bitcoin#16645 | 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
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 [[bitcoin/bitcoin#12775 | PR12775]], [[bitcoin/bitcoin#16622 | PR16622]] and [[bitcoin/bitcoin#16645 | 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
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 [[bitcoin/bitcoin#12775 | PR12775]], [[bitcoin/bitcoin#16622 | PR16622]] and [[bitcoin/bitcoin#16645 | 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
…ocumentation 8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack) Pull request description: This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10). The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md. ACKs for top commit: fanquake: ACK 8616c81 - Thanks for updating. Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
…ocumentation 8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack) Pull request description: This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10). The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md. ACKs for top commit: fanquake: ACK 8616c81 - Thanks for updating. Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
…ocumentation 8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack) Pull request description: This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10). The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md. ACKs for top commit: fanquake: ACK 8616c81 - Thanks for updating. Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
…ocumentation 8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack) Pull request description: This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10). The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md. ACKs for top commit: fanquake: ACK 8616c81 - Thanks for updating. Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
…ocumentation 8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack) Pull request description: This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10). The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md. ACKs for top commit: fanquake: ACK 8616c81 - Thanks for updating. Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
…ocumentation 8616c81 doc: initial RapidCheck property-based testing documentation (Jon Atack) Pull request description: This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10). The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md. ACKs for top commit: fanquake: ACK 8616c81 - Thanks for updating. Tree-SHA512: 9c2a65f0eb99f59e9adfea82855f217727a8a9d30618c1c0bdd2a73ae9c1ee61bc7efd59fc8703a666d182ad4220e22d6034ac3109311e6573dad00dfa4b06ea
This commit proposes documentation that would have been helpful to me when setting up RapidCheck to work correctly with Bitcoin Core. I tested these instructions repeatedly with Linux (Debian 4.19 / GCC 8.3) and macOS (10.14.6 / AppleClang 10).
The markdown version can be seen at https://github.com/jonatack/bitcoin/blob/rapidcheck-documentation/doc/rapidcheck.md.