Re: Autotesting - GNU Autoconf

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

 



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      ())_.  gary@{lilith.warpmail.net,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

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux