output: make --skip to take arguments what will be skipped

Accidental typo in usage() caused realisation making skipping to fully
controllable is good idea.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2017-11-13 20:23:12 +00:00
parent e4f7259cf6
commit 3369278fc0
No known key found for this signature in database
GPG key ID: A9553245FDE9B739
9 changed files with 216 additions and 23 deletions

80
tests/expected/skip Normal file
View file

@ -0,0 +1,80 @@
--- skip ok ---
Ranges:
shared net name first ip last ip max cur percent touch t+c t+c perc bu bu perc
example1 10.0.0.1 - 10.0.0.20 20 11 55.000 0 11 55.000 1 5.000
example1 10.1.0.1 - 10.1.0.20 20 10 50.000 0 10 50.000 0 0.000
example2 10.3.0.1 - 10.3.0.20 20 9 45.000 0 9 45.000 0 0.000
Shared networks:
name max cur percent touch t+c t+c perc bu bu perc
example1 40 21 52.500 0 21 52.500 1 2.500
Sum of all ranges:
name max cur percent touch t+c t+c perc bu bu perc
All networks 100 43 43.000 0 43 43.000 2 2.000
--- skip warning ---
Ranges:
shared net name first ip last ip max cur percent touch t+c t+c perc bu bu perc
example1 10.0.0.1 - 10.0.0.20 20 11 55.000 0 11 55.000 1 5.000
example2 10.2.0.1 - 10.2.0.20 20 8 40.000 0 8 40.000 0 0.000
All networks 10.4.0.1 - 10.4.0.20 20 5 25.000 0 5 25.000 1 5.000
Shared networks:
name max cur percent touch t+c t+c perc bu bu perc
example1 40 21 52.500 0 21 52.500 1 2.500
example2 40 17 42.500 0 17 42.500 0 0.000
Sum of all ranges:
name max cur percent touch t+c t+c perc bu bu perc
All networks 100 43 43.000 0 43 43.000 2 2.000
--- skip critical ok ---
Ranges:
shared net name first ip last ip max cur percent touch t+c t+c perc bu bu perc
example1 10.1.0.1 - 10.1.0.20 20 10 50.000 0 10 50.000 0 0.000
example2 10.3.0.1 - 10.3.0.20 20 9 45.000 0 9 45.000 0 0.000
Shared networks:
name max cur percent touch t+c t+c perc bu bu perc
Sum of all ranges:
name max cur percent touch t+c t+c perc bu bu perc
All networks 100 43 43.000 0 43 43.000 2 2.000
--- skip suppressed ---
Ranges:
shared net name first ip last ip max cur percent touch t+c t+c perc bu bu perc
All networks 10.4.0.1 - 10.4.0.20 20 5 25.000 0 5 25.000 1 5.000
Shared networks:
name max cur percent touch t+c t+c perc bu bu perc
example1 40 21 52.500 0 21 52.500 1 2.500
example2 40 17 42.500 0 17 42.500 0 0.000
Sum of all ranges:
name max cur percent touch t+c t+c perc bu bu perc
All networks 100 43 43.000 0 43 43.000 2 2.000
--- skip minsize ---
Ranges:
shared net name first ip last ip max cur percent touch t+c t+c perc bu bu perc
Shared networks:
name max cur percent touch t+c t+c perc bu bu perc
example1 40 21 52.500 0 21 52.500 1 2.500
example2 40 17 42.500 0 17 42.500 0 0.000
Sum of all ranges:
name max cur percent touch t+c t+c perc bu bu perc
All networks 100 43 43.000 0 43 43.000 2 2.000
--- skip count ok ---
Ranges:
shared net name first ip last ip max cur percent touch t+c t+c perc bu bu perc
example1 10.0.0.1 - 10.0.0.20 20 11 55.000 0 11 55.000 1 5.000
example1 10.1.0.1 - 10.1.0.20 20 10 50.000 0 10 50.000 0 0.000
example2 10.2.0.1 - 10.2.0.20 20 8 40.000 0 8 40.000 0 0.000
example2 10.3.0.1 - 10.3.0.20 20 9 45.000 0 9 45.000 0 0.000
Shared networks:
name max cur percent touch t+c t+c perc bu bu perc
Sum of all ranges:
name max cur percent touch t+c t+c perc bu bu perc
All networks 100 43 43.000 0 43 43.000 2 2.000