Skip to content
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

Running a single test file #1568

Open
Sjors opened this issue Jul 9, 2024 · 5 comments · May be fixed by #1211
Open

Running a single test file #1568

Sjors opened this issue Jul 9, 2024 · 5 comments · May be fixed by #1211

Comments

@Sjors
Copy link
Member

Sjors commented Jul 9, 2024

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...

@Sjors
Copy link
Member Author

Sjors commented Jul 9, 2024

Even with --disable-exhaustive-tests it's a bit slow when e.g. you're just trying to monkey-wrench test vectors.

@real-or-random
Copy link
Contributor

./tests 4 or even ./tests 0 may help you.

@Sjors
Copy link
Member Author

Sjors commented Jul 9, 2024

./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.

@jonasnick
Copy link
Contributor

PR #1211 is an attempt to implement this.

@hebasto
Copy link
Member

hebasto commented Aug 12, 2024

Maybe this is already possible...

Yes, it is possible when using CMake:

$ cmake -B build
$ cmake --build build
$ ctest --test-dir build --show-only 
Internal ctest changing into directory: /home/hebasto/git/secp256k1/secp256k1/build
Test project /home/hebasto/git/secp256k1/secp256k1/build
  Test #1: noverify_tests
  Test #2: tests
  Test #3: exhaustive_tests

Total Tests: 3
$ ctest --test-dir build --show-only -R ^tests
Internal ctest changing into directory: /home/hebasto/git/secp256k1/secp256k1/build
Test project /home/hebasto/git/secp256k1/secp256k1/build
  Test #2: tests

Total Tests: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants