autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autotesting - GNU Autoconf


From: Gary V. Vaughan
Subject: Re: Autotesting - GNU Autoconf
Date: Thu, 06 Apr 2006 10:43:27 +0100
User-agent: Thunderbird 1.5 (X11/20051201)

Ralf Wildenhues wrote:
>> AT_DATA([experr],
>> [[/import/eno/2/rnsr312/param-0.3/tests/syntaxerr:8.0: syntax error,
>> unexpected TOKEN_ID_INT, expecting %% or int or intlist
>> educt: Syntax error in file.
>> ]])
>> AT_CHECK([educt --prettyprint
>> /import/eno/2/rnsr312/param-0.3/tests/syntaxerr],[1],,experr,
>> [echo Failed],[echo Passed])
> 
> For stuff like this you could
>   AT_CHECK([educt --prettyprint $at_srcdir/syntaxerr], [1], [], [stderr], 
>            [echo Failed], [echo Passed])
>   AT_CHECK([grep 'syntaxerr:8.0: syntax error' stderr], [0], [ignore])
>   ...

Consider also the case of trying to match strerror() or perror() output,
which usually has different wording on different hosts... and libtool's
argv[0] mangling with `lt-' prefixes... and search path setting to pick
up uninstalled modules and/or configuration when run in the build tree...

In order that the suite ports easily to 'make check' and 'make installcheck',
the best way to handle such things maintainably is to use a wrapper script
for the binaries that are being tested.  The scripts job is then to
canonicalise any of these cases that you care about.  As an example CVS M4
has such a script in test/m4.

Cheers,
        Gary.
-- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]