On 01/26/2011 08:55 AM, Eve-Marie Devaliere wrote: > Dear autoconf community, > > I am switching a program from the 'old makefile/configure way' to > autoconf... > > I got configure and make and make install to work but would like to now > add the tests that were happening by running 'make test'... (run-time tests) Autoconf includes the 'autotest' language, which parses a new file tests.at to build up a (shell script) testsuite; as well as documentation for a couple of hooks to add in configure.ac and your Makefile to run such a testsuite. Such tests need not be C programs - they are anything that you can drive via shell snippets. In fact, autoconf's own testsuite is written in the autotest language. But I'm not sure if this is what you had in mind. http://www.gnu.org/software/autoconf/manual/autoconf.html#Using-Autotest Meanwhile, Automake has support for building up a testsuite based on various input files, maybe it's easier to use? http://www.gnu.org/software/automake/manual/automake.html#Tests > I have searched the web and I came across AC_TRY_RUN but it apparently > requires to run a C program ; the tests were executed with a shell > script. AC_TRY_RUN is for determining a platform characteristic at configure time, not for running a testsuite at make time. I think you're confusing the issue, and don't need AC_TRY_RUN for a make-time test. Also, AC_TRY_RUN is an obsolete wrapper around the newer AC_RUN_IFELSE macro; this macro does not inherently require a C compiler, but runs a configure-time compile/run/cross-compile-guess based on the current language being probed in the configure.ac file (which is usually C, but can be Fortran). Furthermore, if your Makefile already knows how to run your tests, then your Makefile.in (if you only use autoconf) or Makefile.am (if you also use automake) can preserve those test rules as-is, and still run those tests as you have always done as part of make. -- 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