Running a single test file #1568

issue Sjors openend this issue on July 9, 2024
  1. Sjors commented at 12:33 pm on July 9, 2024: member

    Similar to src/test/test_bitcoin --run-test=something I’d like to be able to run a single test file, because make check takes a while.

    Maybe this is already possible, in which it just needs a README change…

  2. Sjors commented at 12:37 pm on July 9, 2024: member
    Even with --disable-exhaustive-tests it’s a bit slow when e.g. you’re just trying to monkey-wrench test vectors.
  3. real-or-random commented at 1:01 pm on July 9, 2024: contributor
    ./tests 4 or even ./tests 0 may help you.
  4. Sjors commented at 1:13 pm on July 9, 2024: member

    ./tests 0 fails with An iteration count of 0 or less is not allowed..

    ./tests 1 takes 14 seconds for me. Doable but not as nice as ~1 second.

  5. jonasnick commented at 6:05 pm on July 9, 2024: contributor
    PR #1211 is an attempt to implement this.
  6. real-or-random added the label assurance on Jul 9, 2024
  7. hebasto commented at 10:33 am on August 12, 2024: member

    Maybe this is already possible…

    Yes, it is possible when using CMake:

     0$ cmake -B build
     1$ cmake --build build
     2$ ctest --test-dir build --show-only 
     3Internal ctest changing into directory: /home/hebasto/git/secp256k1/secp256k1/build
     4Test project /home/hebasto/git/secp256k1/secp256k1/build
     5  Test [#1](/bitcoin-core-secp256k1/1/): noverify_tests
     6  Test [#2](/bitcoin-core-secp256k1/2/): tests
     7  Test [#3](/bitcoin-core-secp256k1/3/): exhaustive_tests
     8
     9Total Tests: 3
    10$ ctest --test-dir build --show-only -R ^tests
    11Internal ctest changing into directory: /home/hebasto/git/secp256k1/secp256k1/build
    12Test project /home/hebasto/git/secp256k1/secp256k1/build
    13  Test [#2](/bitcoin-core-secp256k1/2/): tests
    14
    15Total Tests: 1
    

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-12-11 06:15 UTC

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