[PATCH] tests: keep shooting until hgweb is dead

Gilles Moris gilles.moris at free.fr
Wed Nov 26 07:49:08 CST 2008


On Wed November 26 2008 01:53:01 Mads Kiilerich wrote:
> -kill `cat hg.pid`
> +while kill `cat hg.pid` 2> /dev/null; do :; done
> 

Yes, with this patch, those two tests that were usually failing on my Fedora 8, now succeed.
However, to prevent any infinite loop if something goes wrong in the signal handling
of hg serve, I would propose the rather more secure:

i=0; while [ $i -lt  100 ] && kill `cat hg.pid` 2> /dev/null; do :; i=`expr $i + 1`; done

Note that I checked the timings and did not note any performance degradation of
the test durations.

Regards.
Gilles.


More information about the Mercurial-devel mailing list