[cairo] Test programs extension

Peter Weilbacher (Mozilla) mozilla at Weilbacher.org
Wed Dec 6 17:18:02 PST 2006


On Wed, 06 Dec 2006 18:45:32 -0500, Behdad Esfahbod wrote:

>On Wed, 2006-12-06 at 17:27 -0500, Peter Weilbacher (Mozilla) wrote:
>> While everybody else is hard at work optimizing algorithms, let me raise
>> another more simpleminded question.
>> 
>> The tests in test/Makefile.am are currently listed without any file
>> extension. While that works fine on Linux, OS/2 has a problem with it.
>> Windows probably, too, but that is obviously using the Makefile.win32
>> now which works around that with $addsuffix. Without the file extension
>> not all necessary CFLAGS/LDFLAGS get assigned and compilation hence
>> doesn't find important things like cairo.h.
>> 
>> The question is now: can $(EXEEXT) be added to all test programs in 
>> test/Makefile.am? That includes the variables TESTS, NOLOG_TESTS,
>> XFAIL_TESTS, and SUPPORT_PROGS. EXEEXT will be empty on Unix, so it
>> should not create a problem. Something like
>> $(addsuffix $(EXEEXT),$(TESTS)) etc. would be easier but does not survive
>> automake...
>
>I don't like the idea of adding $(EXEEXT) to those variables.  And it
>breaks XFAIL_TESTS for example.  I'm not sure what exactly is the
>problem you are facing.

The problem is that automake/configure create a test/Makefile that
contains things like

   a8-mask$(EXEEXT): $(a8_mask_OBJECTS) $(a8_mask_DEPENDENCIES)
   	@rm -f a8-mask$(EXEEXT)
   	$(LINK) $(a8_mask_LDFLAGS) $(a8_mask_OBJECTS) $(a8_mask_LDADD) $(LIBS)

so that a8-mask (without EXEEXT) is never matched to this and only
the standard flags are applied. Hmm, yes, I might have been wrong
about XFAIL_TESTS and NOLOG_TESTS.

>  This this for example help:
>
>$(TESTS:=$(EXEEXT)): $(SUPPORT_PROGS:=$(EXEEXT))
>
>Something along those lines is easier to get in.

Agreed, I never like to patch lots of lines. But that gives me

   test/Makefile.am:489: bad characters in variable name `$(TESTS'

when running automake. And now I am too tired to find out why that
happens...

>I'm going to finally add that driver program called cairo-test so the
>way we run tests will be changed and hopefully problems like this won't
>occur.   I've got to see how bad linking 100s of .o files into
>cairo-test takes...

Interesting approach. Sounds like it will help me indeed.

   Peter.



More information about the cairo mailing list