foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
7.86k stars 1.56k forks source link

feat(coverage): exit early if tests failed #8268

Closed DaniPopes closed 4 days ago

DaniPopes commented 4 days ago

Fixes https://github.com/foundry-rs/foundry/issues/3900

grandizzy commented 4 days ago

I am looking into changing this a little bit in order to fix https://github.com/foundry-rs/foundry/issues/8014#issuecomment-2183965477 The problem with current approach (collecting all test results and generating coverage report) for large codebases is that it requires bunch of mem to store results (in superform case more than 40G, which is OOMed in CI). Going to make a PR to stream result/process coverage report as it goes so hopefully large tests can be better accommodated (and also exit early if any failure), hope this makes sense.