[postgis-devel] Cunit and lwerror

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Mon Jan 25 08:10:58 PST 2010


Olivier Courtin wrote:

> That's a good suggestion !
> 
> I tryed something in this way (patch attached), but still meet 2 problems:
> 
> 1) Common usage with lwerror is to call them directly (i.e without a 
> return as
>     prefix), so i never been able to catch the error message in the 
> cunit test itself
> 
> 2) If i suppress the exit instruction in lwerror handler, i introduce 
> possible
>      (huge) side effect...

I think that the current design expects lwerror to abort which I guess 
means that we leak memory within a particular test executable. I don't 
think this should be a problem in the short term, unless someone 
repeatedly calls lwerror during regression lots of times with something 
that takes lots of memory. Try it and see ;)


ATB,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the postgis-devel mailing list