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

feat: nargo test -q (or nargo test --format terse) #6776

Draft
wants to merge 40 commits into
base: master
Choose a base branch
from

Conversation

asterite
Copy link
Collaborator

@asterite asterite commented Dec 11, 2024

Descriptio

Made on top of #6728

Problem

Towards #6733

Summary

Eventually we'll have nargo test --format json, which is what #6733. As a first step I wanted to introduce the format flag and, to try that abstraction in code I introduced a terse formatter similar to Rust.

On failure we don't immediately print the error. Instead, it's printed at the end (like in Rust). I can imagine this could be used in CI to reduce the output verboseness, because I guess all that matters in CI is seeing which tests failed.

nargo-test-q

Like in Rust, there are two ways to trigger this terse behavior: -q (or --quiet) or --format terse. We could just keep --format terse but I think -q is convenient (and format is more general as it will soon support json).

Here's the output when all tests pass:

image

Additional Context

It would be nice to get rid of those "proptest" messages but I don't know why they happen.

Documentation

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

asterite and others added 30 commits December 6, 2024 17:34
It seems `max_num_threads` is how many threads in theory Rayon could spawn,
which was 2**16 on my machine. `current_num_threads` is the recommended
number of threads to use, which is 10 on my machine.
Copy link
Contributor

github-actions bot commented Dec 11, 2024

Compilation Sample

Program Compilation Time
sha256_regression 0m1.447s
regression_4709 0m1.532s
ram_blowup_regression 0m16.796s

Copy link
Contributor

github-actions bot commented Dec 11, 2024

Peak Memory Sample

Program Peak Memory
keccak256 81.38M
workspace 122.04M
regression_4709 333.59M
ram_blowup_regression 2.55G

@asterite asterite force-pushed the ab/nargo-test-machine-readable-output branch from a4d7df8 to 94aabde Compare December 11, 2024 19:59
Base automatically changed from ab/nargo-test-improvements to master December 12, 2024 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants