On 01/28/2011 10:49 AM, Joel E. Denny wrote: >>> AT_SETUP([testing $file, no arguments]) >>> for file in $datadir/* >>> do >>> AS_IF([bad $file], [continue]) >>> AT_CHECK([replacement $file -o replacement.out]) >>> AT_CHECK([original $file -o original.out]) >>> AT_CHECK([pgcmp replacement.out original.out]) >>> done >>> AT_CLEANUP Single test, with multiple checks. > In my experience, that's true for AT_CHECK, but it isn't true for AT_SETUP > and AT_CLEANUP. In that case, the loop must be written using m4 > constructs not shell constructs. Because I speak shell more easily than > m4, I'd be happy to hear that I'm wrong. Unfortunately correct - if you want multiple tests (that is, where you can run a subset of the testsuite using just testsuite arguments, rather than hacking the 'bad' script filter in that initial AS_IF of the example above), then you must surround AT_SETUP inside an m4 loop to repeat its expansion once per test. It's a tradeoff of the level of test granularity you want; also, using an m4 loop to expand AT_SETUP multiple times creates a larger testsuite, so you don't gain from the compactness of a shell loop. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf