freaking1 / crashpad

Automatically exported from code.google.com/p/crashpad
0 stars 0 forks source link

Mac: death tests shouldn’t go to the system crash reporter #33

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
If you run all tests on Mac now, you’ll wind up creating a good deal of 
litter in ~/Library/Logs/DiagnosticReports for expected crashes that happen due 
to death tests and other expected-crash tests. The system’s crash reporter 
takes a little time to chew on each crashing process to produce the litter, so 
running tests is more time-consuming than it needs to be.

Since we have good exception-handling infrastructure, we should direct all 
expected crashes to a swallowing handler that eats exceptions so that the 
system’s crash reporter never has to see them.

On my laptop, run_tests.py takes 9.2 seconds (Debug) or 6.7 seconds (Release) 
to run when the system’s crash reporter is allowed to write reports for death 
tests, producing 25 unnecessary reports per run. With this change, it produces 
zero reports and runs in 1.7 seconds (Debug) or 1.2 seconds (Release).

A rough version of the change is at https://codereview.chromium.org/1045723006.

Once the tests are able to run in such a small amount of time, we can evaluate 
introducing them to the Chromium waterfall.

Original issue reported on code.google.com by mark@chromium.org on 30 Mar 2015 at 10:19