test: Make secp tests optional in `make check` #20264

pull gwillen wants to merge 1 commits into bitcoin:master from gwillen:feature-optional-secp-check changing 2 files +9 −0
  1. gwillen commented at 7:50 PM on October 29, 2020: contributor

    Add a configure flag to disable running secp tests with every make check.

    Hopefully this isn't too controversial -- I recognize the importance of testing libsecp, and obviously those tests will remain enabled by default. But this flag is useful when doing automated repeated runs of the bitcoin core test suite, to avoid repeatedly re-running the (somewhat expensive) libsecp test suite when libsecp is not changing (since it only gets re-vendored occasionally.)

  2. test: Make secp tests optional in `make check`
    Add a configure flag to disable running secp tests with every `make check`.
    ed15cc48bb
  3. luke-jr commented at 7:51 PM on October 29, 2020: member

    Why not just run the tests you want directly, instead of the all-tests make check wrapper?

  4. gwillen commented at 7:55 PM on October 29, 2020: contributor

    Hmm, that's a good question. Mostly I don't quite know how to do that. I see that make check runs the following things:

    make -C src/ check-TESTS (which I definitely want) test/util/bitcoin-util-test.py (which I maybe don't actually want, but it only takes a couple seconds) test/util/rpcauth-test.py (which I don't actually know what it tests, but it runs instantly) bench/bench_bitcoin (which I probably want, I think) make -C src/secp256k1/ check (which I don't want) make -C src/univalue/ check (which is probably irrelevant but also runs instantly)

    So it might be that make -C src/ check-TESTS would actually do what I want. Is the above actually a comprehensive list of what make check runs?

  5. sipa commented at 7:57 PM on October 29, 2020: member

    I think the stuff currently covered by make check is kind of arbitrary anyway. Why doesn't it include the functional tests, for example?

  6. gwillen commented at 8:01 PM on October 29, 2020: contributor

    Yeah, I had previously (before today) mostly thought of make check as just running the stuff that's actually make -C src/ check-TESTS. I didn't know about some of the other stuff.

    I think it makes sense for make check to mostly run stuff that's fast and/or really important, and the functional tests to be slower and more thorough. I assume "really important" is the argument for why the secp tests run by default, even though they are a bit slow (although similar to the main unit tests in speed I guess), and unlikely to break.

  7. gwillen commented at 8:04 PM on October 29, 2020: contributor

    Ok for what it's worth, I'm convinced by @luke-jr 's point that I would be better off having my script just directly run the parts of make check that I want. Can someone confirm or refute my list of them above? After that I don't strongly care about this PR anymore, except insofar as it produces useful discussions of how the tests ought to be organized.

  8. DrahtBot added the label Build system on Oct 29, 2020
  9. DrahtBot commented at 1:18 AM on October 30, 2020: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #18077 (net: Add NAT-PMP port forwarding support by hebasto)

    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.

  10. fanquake commented at 5:50 AM on October 30, 2020: member

    ~0. I don't think there's a need for us to add a configure option here. If you're trying to save resources I'd also suggest just disabling targets like the benchmarks (--disable-bench) if you aren't interested in compiling / running them. You can also run tests directly using src/test/test_bitcoin --run_test=scriptpubkeyman_tests,init_tests,some_more_tests etc.

  11. gwillen commented at 8:34 AM on October 30, 2020: contributor

    I'm going to close this just to save on people's attention, since I have a better way and it doesn't seem like anybody's particularly in love with it. If someone is in fact in love with it, I'm happy to reopen.

  12. gwillen closed this on Oct 30, 2020

  13. kristapsk referenced this in commit b2069cdf83 on Nov 6, 2020
  14. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me