cmake, test: Add secp256k1_ prefix to test names #1582

pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:240812-testname changing 2 files +4 −4
  1. hebasto commented at 11:15 am on August 12, 2024: member

    This PR improves regex matching options when using ctest in downstream projects, such as Bitcoin Core.

    For instance, a downstream project users can filter their tests like that:

    0ctest --tests-regex "secp256k1"
    

    or

    0ctest --exclude-regex "secp256k1"
    

    A ctest log with this PR:

     0$ ctest --test-dir build -j 16
     1Internal ctest changing into directory: /home/hebasto/git/secp256k1/secp256k1/build
     2Test project /home/hebasto/git/secp256k1/secp256k1/build
     3    Start 1: secp256k1_noverify_tests
     4    Start 2: secp256k1_tests
     5    Start 3: secp256k1_exhaustive_tests
     6    Start 4: secp256k1_ecdsa_example
     7    Start 5: secp256k1_ecdh_example
     8    Start 6: secp256k1_schnorr_example
     9    Start 7: secp256k1_ellswift_example
    10    Start 8: secp256k1_musig_example
    111/8 Test [#4](/bitcoin-core-secp256k1/4/): secp256k1_ecdsa_example ..........   Passed    0.00 sec
    122/8 Test [#5](/bitcoin-core-secp256k1/5/): secp256k1_ecdh_example ...........   Passed    0.00 sec
    133/8 Test [#6](/bitcoin-core-secp256k1/6/): secp256k1_schnorr_example ........   Passed    0.00 sec
    144/8 Test [#7](/bitcoin-core-secp256k1/7/): secp256k1_ellswift_example .......   Passed    0.00 sec
    155/8 Test [#8](/bitcoin-core-secp256k1/8/): secp256k1_musig_example ..........   Passed    0.00 sec
    166/8 Test [#3](/bitcoin-core-secp256k1/3/): secp256k1_exhaustive_tests .......   Passed    6.19 sec
    177/8 Test [#1](/bitcoin-core-secp256k1/1/): secp256k1_noverify_tests .........   Passed   38.83 sec
    188/8 Test [#2](/bitcoin-core-secp256k1/2/): secp256k1_tests ..................   Passed   91.66 sec
    19
    20100% tests passed, 0 tests failed out of 8
    21
    22Total Test time (real) =  91.67 sec
    
  2. hebasto commented at 11:15 am on August 12, 2024: member
  3. real-or-random added the label feature on Aug 17, 2024
  4. real-or-random added the label build on Aug 17, 2024
  5. real-or-random commented at 2:17 pm on August 17, 2024: contributor
    Concept ACK if this helps Core
  6. sipa commented at 8:23 am on October 17, 2024: contributor
    Alternatively, could we just add a secp256k1_ prefix to our test names?
  7. cmake, test: Add `secp256k1_` prefix to test names
    This change improves regex matching options when using `ctest` in
    downstream projects.
    87384f5c0f
  8. hebasto force-pushed on Oct 17, 2024
  9. hebasto commented at 9:01 am on October 17, 2024: member
    Rebased. @sipa’s suggestion has been accepted.
  10. hebasto renamed this:
    cmake, test: Introduce `SECP256K1_TESTNAME_PREFIX` variable
    cmake, test: Add `secp256k1_` prefix to test names
    on Oct 17, 2024
  11. real-or-random removed the label feature on Oct 17, 2024
  12. real-or-random added the label refactor/smell on Oct 17, 2024
  13. real-or-random approved
  14. real-or-random commented at 2:19 pm on October 17, 2024: contributor
    utACK 87384f5c0f2bdf2b500858a18f5397e8dcffa8ec
  15. theuni commented at 3:35 pm on October 28, 2024: contributor

    Concept ACK.

    Shouldn’t autotools get the same treatment though?

  16. hebasto commented at 3:56 pm on October 28, 2024: member

    Shouldn’t autotools get the same treatment though?

    This PR modifies only test names, while leaving executable names untouched. The concept of “named tests” is not applicable to Autotools. Changing the executable names seems quite invasive though.

  17. theuni commented at 4:35 pm on October 28, 2024: contributor

    Thanks, I misunderstood. Based on sipa’s comment I thought this was actually renaming, which would’ve been fine with me too. That explains the simplicity :)

    utACK 87384f5c0f2bdf2b500858a18f5397e8dcffa8ec

  18. real-or-random merged this on Oct 29, 2024
  19. real-or-random closed this on Oct 29, 2024

  20. hebasto deleted the branch on Oct 30, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 23:15 UTC

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