Skip to content

Conversation

jonatack
Copy link
Member

@jonatack jonatack commented Aug 15, 2019

Enable users to see if the prop tests are enabled during the build. This can be particularly helpful as property-based tests are silently auto-enabled by default if librapidcheck is found.

Sample build output:

Options used to compile and link:
  with wallet   = yes
  with gui / qt = yes
    with bip70  = yes
    with qr     = yes
  with zmq      = yes
  with test     = yes
    with prop   = yes                  <--- new
    with fuzz   = no
  with bench    = no

@maflcko maflcko changed the title autoconf: property tests status and options build: property tests status and options Aug 15, 2019
@cvengler
Copy link
Contributor

Concept ACK bdefd5c

@cvengler
Copy link
Contributor

@jonatack I asked for you if someone can restart travis, this happens to me quite often as well.

@jonatack jonatack force-pushed the property-tests-autoconf-improvements branch from bdefd5c to c668216 Compare August 15, 2019 23:44
@jonatack jonatack changed the title build: property tests status and options build: echo property tests status during build Aug 15, 2019
@jonatack
Copy link
Member Author

jonatack commented Aug 15, 2019

Simplified the PR. Two of the Travis builds timed out; the others are green and this commit doesn't change anything that would fail.

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK - will test shortly. If you're interested in the build system and property tests, you might also want to checkout #14694.

configure.ac Outdated
@@ -131,9 +131,10 @@ AC_ARG_ENABLE(gui-tests,
[use_gui_tests=$enableval],
[use_gui_tests=$use_tests])

# Enable RapidCheck property-based tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need the extra comment here. That string is in the arg description, and none of the other AC_ARG_WITH instances have comments.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing. I saw that L247 (AC_ARG_WITH for sanitizers) has a comment as well as some of the AC_ARG_ENABLES. That said, ARG_WITH would normally be about building with a package, not enabling features, so L247 may not be a good example to follow. I'll remove and force push.

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK c668216 - with the extra comment removed.

Enable users to see if the prop tests are enabled during the build. This can be particularly helpful as property-based tests are silently auto-enabled by default if librapidcheck is found.

Minor fixes to the docs and help grammar for this option.
@jonatack jonatack force-pushed the property-tests-autoconf-improvements branch from c668216 to a6c1fc3 Compare August 16, 2019 09:53
@jonatack
Copy link
Member Author

Thanks @fanquake for testing, and also for suggesting having a look at #14694 which addresses an issue I've been seeing. Extra comment removed.

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK a6c1fc3 - Thanks. Tested ./configure with and without rapidcheck available.

fanquake added a commit that referenced this pull request Aug 17, 2019
a6c1fc3 build: echo prop tests status during build (Jon Atack)

Pull request description:

  Enable users to see if the prop tests are enabled during the build. This can be particularly helpful as property-based tests are silently auto-enabled by default if librapidcheck is found.

  Sample build output:

  ```
  Options used to compile and link:
    with wallet   = yes
    with gui / qt = yes
      with bip70  = yes
      with qr     = yes
    with zmq      = yes
    with test     = yes
      with prop   = yes                  <--- new
      with fuzz   = no
    with bench    = no
  ```

ACKs for top commit:
  fanquake:
    ACK a6c1fc3 - Thanks. Tested `./configure` with and without rapidcheck available.

Tree-SHA512: 460f3b83ee2a03e6dcc53bc326ac210d2484895e11766be117920fbc6fa78cdbcd4267cbceda9447c2f5fa5a7f218865ccc929ac6319308e397c0a5603571ecd
@fanquake fanquake merged commit a6c1fc3 into bitcoin:master Aug 17, 2019
@jonatack jonatack deleted the property-tests-autoconf-improvements branch August 17, 2019 09:26
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Feb 27, 2020
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
deadalnix pushed a commit to Bitcoin-ABC/secp256k1 that referenced this pull request Feb 28, 2020
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
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request May 19, 2020
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants