The hacks I am currently using are entirely outside of Automake. Once the issues are fully understood and agreed to, it would be nice to see some support make it into Automake, perhaps triggered by an Automake option (e.g. subdir-tests).
There are a number of things that Automake can do to help "traditional" script-based tests:
1) Ensure that the definition of $srcdir is well-rooted so that it
is still useful after a directory change. A path like "." is
nice and short but not very helpful.
2) Provide another variable which is a well-rooted path to the
directory where the test script (or source to the test
program if the test is compiled) resides. $srcdir could be
used if it reflects the path to where the script or program
source resides. If $srcdir is used, then it is possible
for existing test scripts to not need to be altered at all.
3) Automatically change directory to the appropriate subdirectory
under the build tree so that the script doesn't need to do its
own directory change.As an example, this is what I did to implement tests in a subdirectory called 'tests'. The tests subdirectory contains a script named common.shi which is included first into all test scripts in order to make sense of things.
========= Fragment (common.shi) included into all Test scripts SRCDIR=`dirname $0` SRCDIR=`cd $SRCDIR && pwd` TOPSRCDIR=`cd $srcdir && pwd` cd tests || exit 1
========= Test script:
# Copyright (C) 2004 GraphicsMagick Group
#
# This program is covered by multiple licenses, which are described in
# Copyright.txt. You should have received a copy of Copyright.txt with this
# package; otherwise see http://www.graphicsmagick.org/www/Copyright.html.
. ${srcdir}/tests/common.shi
${RUNENV} ${MEMCHECK} ./rwfile ${SRCDIR}/input_pallette.miff GIFIn the above, ${RUNENV} and ${MEMCHECK} are environment variables passed down from the Makefile to the tests.
Thoughts?
Bob ====================================== Bob Friesenhahn [EMAIL PROTECTED] http://www.simplesystems.org/users/bfriesen
