Skip to content

Commit 6cd6618

Browse files
danielrachi1gakonstmattsse
authored
feat(forge): add contract ignore list for gas reports (#2528)
* feat(forge): add contract ignore list for gas reports * Update cli/tests/it/cmd.rs Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: Georgios Konstantopoulos <me@gakonst.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
1 parent da1f9f4 commit 6cd6618

File tree

8 files changed

+429
-17
lines changed

8 files changed

+429
-17
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/src/cmd/forge/test/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ fn test(
496496
let handle = thread::spawn(move || runner.test(&filter, Some(tx), test_options).unwrap());
497497

498498
let mut results: BTreeMap<String, SuiteResult> = BTreeMap::new();
499-
let mut gas_report = GasReport::new(config.gas_reports);
499+
let mut gas_report = GasReport::new(config.gas_reports, config.gas_reports_ignore);
500500
for (contract_name, suite_result) in rx {
501501
let mut tests = suite_result.test_results.clone();
502502
println!();

cli/test-utils/src/util.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,8 @@ impl TestCommand {
501501
}
502502

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

0 commit comments

Comments
 (0)