script: fix display of ten slowest tests if < 10 tests are run.
authorMichael Adam <obnox@samba.org>
Mon, 27 Oct 2014 11:35:12 +0000 (12:35 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 30 Oct 2014 19:25:04 +0000 (20:25 +0100)
commit062289f0f896af85671adad09a9a2afc027be570
treeb6dd7f8d16f361fbf896042716dbc8c2b580f4f3
parent6168ae0b870e847417af39f3e007dc583315ffdf
script: fix display of ten slowest tests if < 10 tests are run.

Note: $#array is the biggest index in an array in perl.
@array evaluated in scalar context is the number of elements.
Hence scalar(@array) = 1 + $#array

Or equivalently: 0 + @array = 1 + $#array

... :-)

Apart from this off-by-one error, the "unless" clause to trigger
the capping of the number of tests listed was wrong. Hence if
less then 10 tests were run, a number of blank lines were appended.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
script/show_testsuite_time