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

fix: include traces field when running forge test -vvvv --json #9034

Merged
merged 5 commits into from
Oct 7, 2024

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Oct 4, 2024

Motivation

Closes: #6922

Part of a larger meta-ticket: #8794

Solution

Enable and includes traces in JSON output when forge test is ran with --json enabled (and verbosity >= 3)

Includes Snapbox tests

Future improvements could include making TraceWriter in revm-inspectors JSON compatible so we return decoded traces and well as #7813 once that is added.

This should not impact the JUnit XML reports as that follows a strict schema already

@zerosnacks zerosnacks marked this pull request as ready for review October 4, 2024 16:21
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

crates/forge/tests/cli/test_cmd.rs Outdated Show resolved Hide resolved
crates/forge/tests/cli/test_cmd.rs Outdated Show resolved Hide resolved
crates/forge/tests/cli/test_cmd.rs Outdated Show resolved Hide resolved
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, pending nits

@zerosnacks zerosnacks enabled auto-merge (squash) October 7, 2024 07:35
@zerosnacks zerosnacks merged commit 22a72d5 into master Oct 7, 2024
21 checks passed
@zerosnacks zerosnacks deleted the zerosnacks/traces-field-is-mising branch October 7, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready For Review
Development

Successfully merging this pull request may close these issues.

bug: traces field is missing when display option --json is set
4 participants