mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-19 19:28:42 +00:00
Add --min-duration option
A test runner already has a --durations option to print durations. However, this isn't entirely satisfactory. When there are many tests, this produces output spam which makes it hard to find the test failure output. Nevertheless, it is helpful to be informed of tests which are unusually slow. Therefore, introduce a new option --min-duration that causes all durations above a certain threshold to be printed. This allows slow tests to be visible without mentioning every test.
This commit is contained in:
parent
36131f7ffa
commit
80b0d6975c
12 changed files with 94 additions and 4 deletions
|
@ -170,6 +170,9 @@ namespace Catch {
|
|||
| Opt( [&]( bool flag ) { config.showDurations = flag ? ShowDurations::Always : ShowDurations::Never; }, "yes|no" )
|
||||
["-d"]["--durations"]
|
||||
( "show test durations" )
|
||||
| Opt( config.minDuration, "seconds" )
|
||||
["-D"]["--min-duration"]
|
||||
( "show test durations for tests taking at least the given number of seconds" )
|
||||
| Opt( loadTestNamesFromFile, "filename" )
|
||||
["-f"]["--input-file"]
|
||||
( "load test names to run from a file" )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue