Thread (20 messages) flat view 20 messages, 3 authors, 2016-06-15

Re: [PATCH 04/10] test-lib: Replace uses of $(expr ...) by POSIX shell features.

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:46:25

Johannes Schindelin schrieb:
Hi,

On Wed, 18 Mar 2009, Johannes Sixt wrote:
quoted
In particular:

- Test case counting can be achieved by arithmetic expansion.

- The name of the test, e.g. t1234, can be computed with ${0%%} and ${0##}.

Signed-off-by: Johannes Sixt <redacted>
I guess this makes the tests less slow on Windows?  Do you have numbers?
Actually, while reading through test-lib.sh I found those expr expressions
quite difficult to understand, and my primary intent was to make the code
more readable. Furthermore, as you can see in the hunk that touches
test_known_broken_{ok,failure}_ that the $(( )) construct is already in
use, so it's also a change to improve consistency.

The shorter runtime (primarily on Windows) is just a nice side effect,
although the gain probably vanishes in the noise.
FWIW I run the tests on Windows with -j10 these days, and they take about 
15 minutes on a quad core 3GHz machine (which I may use from time to time; 
the machine is not mine, otherwise it would run Linux).
Last time I tried -j<something> it bailed out early. I didn't try again
since then. Sequential tests finish in 30-40 minutes here, but I don't run
SVN tests.

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help