Skip to content

Commit

Permalink
feat(forge): add contract ignore list for gas reports
Browse files Browse the repository at this point in the history
  • Loading branch information
danielramirezch committed Aug 9, 2022
1 parent af3c9d3 commit f4210c4
Show file tree
Hide file tree
Showing 8 changed files with 430 additions and 17 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/src/cmd/forge/test/mod.rs
Expand Up @@ -492,7 +492,7 @@ fn test(
thread::spawn(move || runner.test(&filter, Some(tx), include_fuzz_tests).unwrap());

let mut results: BTreeMap<String, SuiteResult> = BTreeMap::new();
let mut gas_report = GasReport::new(config.gas_reports);
let mut gas_report = GasReport::new(config.gas_reports, config.gas_reports_ignore);
for (contract_name, suite_result) in rx {
let mut tests = suite_result.test_results.clone();
println!();
Expand Down
2 changes: 2 additions & 0 deletions cli/test-utils/src/util.rs
Expand Up @@ -501,6 +501,8 @@ impl TestCommand {
}

/// Runs the command and prints its output
/// You have to pass --nocapture to cargo test or the print won't be displayed.
/// The full command would be: cargo test -- --nocapture
pub fn print_output(&mut self) {
let output = self.execute();
println!("stdout: {}", String::from_utf8_lossy(&output.stdout));
Expand Down

0 comments on commit f4210c4

Please sign in to comment.