-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…9034) * enable traces as part of verbose output when tests are ran with --json, includes tests * Update crates/forge/tests/cli/test_cmd.rs Co-authored-by: DaniPopes <[email protected]> * Update crates/forge/tests/cli/test_cmd.rs Co-authored-by: DaniPopes <[email protected]> * use forgetest! directly --------- Co-authored-by: DaniPopes <[email protected]>
- Loading branch information
1 parent
47f1ecb
commit 22a72d5
Showing
5 changed files
with
242 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
crates/forge/tests/fixtures/SimpleContractTestNonVerbose.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"src/Simple.t.sol:SimpleContractTest": { | ||
"duration": "{...}", | ||
"test_results": { | ||
"test()": { | ||
"status": "Success", | ||
"reason": null, | ||
"counterexample": null, | ||
"logs": [], | ||
"kind": { | ||
"Unit": { | ||
"gas": "{...}" | ||
} | ||
}, | ||
"traces": [], | ||
"labeled_addresses": {}, | ||
"duration": { | ||
"secs": "{...}", | ||
"nanos": "{...}" | ||
}, | ||
"breakpoints": {}, | ||
"gas_snapshots": {} | ||
} | ||
}, | ||
"warnings": [] | ||
} | ||
} |
172 changes: 172 additions & 0 deletions
172
crates/forge/tests/fixtures/SimpleContractTestVerbose.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
{ | ||
"src/Simple.t.sol:SimpleContractTest": { | ||
"duration": "{...}", | ||
"test_results": { | ||
"test()": { | ||
"status": "Success", | ||
"reason": null, | ||
"counterexample": null, | ||
"logs": [], | ||
"kind": { | ||
"Unit": { | ||
"gas": "{...}" | ||
} | ||
}, | ||
"traces": [ | ||
[ | ||
"Deployment", | ||
{ | ||
"arena": [ | ||
{ | ||
"parent": null, | ||
"children": [], | ||
"idx": 0, | ||
"trace": { | ||
"depth": 0, | ||
"success": true, | ||
"caller": "0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38", | ||
"address": "0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496", | ||
"maybe_precompile": false, | ||
"selfdestruct_address": null, | ||
"selfdestruct_refund_target": null, | ||
"selfdestruct_transferred_value": null, | ||
"kind": "CREATE", | ||
"value": "0x0", | ||
"data": "{...}", | ||
"output": "{...}", | ||
"gas_used": "{...}", | ||
"gas_limit": "{...}", | ||
"status": "Return", | ||
"steps": [], | ||
"decoded": { | ||
"label": null, | ||
"return_data": null, | ||
"call_data": null | ||
} | ||
}, | ||
"logs": [], | ||
"ordering": [] | ||
} | ||
] | ||
} | ||
], | ||
[ | ||
"Execution", | ||
{ | ||
"arena": [ | ||
{ | ||
"parent": null, | ||
"children": [ | ||
1, | ||
2 | ||
], | ||
"idx": 0, | ||
"trace": { | ||
"depth": 0, | ||
"success": true, | ||
"caller": "0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38", | ||
"address": "0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496", | ||
"maybe_precompile": null, | ||
"selfdestruct_address": null, | ||
"selfdestruct_refund_target": null, | ||
"selfdestruct_transferred_value": null, | ||
"kind": "CALL", | ||
"value": "0x0", | ||
"data": "0xf8a8fd6d", | ||
"output": "0x", | ||
"gas_used": "{...}", | ||
"gas_limit": "{...}", | ||
"status": "Stop", | ||
"steps": [], | ||
"decoded": { | ||
"label": null, | ||
"return_data": null, | ||
"call_data": null | ||
} | ||
}, | ||
"logs": [], | ||
"ordering": [ | ||
{ | ||
"Call": 0 | ||
}, | ||
{ | ||
"Call": 1 | ||
} | ||
] | ||
}, | ||
{ | ||
"parent": 0, | ||
"children": [], | ||
"idx": 1, | ||
"trace": { | ||
"depth": 1, | ||
"success": true, | ||
"caller": "0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496", | ||
"address": "0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f", | ||
"maybe_precompile": false, | ||
"selfdestruct_address": null, | ||
"selfdestruct_refund_target": null, | ||
"selfdestruct_transferred_value": null, | ||
"kind": "CREATE", | ||
"value": "0x0", | ||
"data": "{...}", | ||
"output": "{...}", | ||
"gas_used": "{...}", | ||
"gas_limit": "{...}", | ||
"status": "Return", | ||
"steps": [], | ||
"decoded": { | ||
"label": null, | ||
"return_data": null, | ||
"call_data": null | ||
} | ||
}, | ||
"logs": [], | ||
"ordering": [] | ||
}, | ||
{ | ||
"parent": 0, | ||
"children": [], | ||
"idx": 2, | ||
"trace": { | ||
"depth": 1, | ||
"success": true, | ||
"caller": "0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496", | ||
"address": "0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f", | ||
"maybe_precompile": null, | ||
"selfdestruct_address": null, | ||
"selfdestruct_refund_target": null, | ||
"selfdestruct_transferred_value": null, | ||
"kind": "CALL", | ||
"value": "0x0", | ||
"data": "0xe26d14740000000000000000000000000000000000000000000000000000000000000064", | ||
"output": "0x", | ||
"gas_used": "{...}", | ||
"gas_limit": "{...}", | ||
"status": "Stop", | ||
"steps": [], | ||
"decoded": { | ||
"label": null, | ||
"return_data": null, | ||
"call_data": null | ||
} | ||
}, | ||
"logs": [], | ||
"ordering": [] | ||
} | ||
] | ||
} | ||
] | ||
], | ||
"labeled_addresses": {}, | ||
"duration": { | ||
"secs": "{...}", | ||
"nanos": "{...}" | ||
}, | ||
"breakpoints": {}, | ||
"gas_snapshots": {} | ||
} | ||
}, | ||
"warnings": [] | ||
} | ||
} |