autoconf
[Top][All Lists]
Advanced

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

Re: autotest with a direct path


From: Eric Blake
Subject: Re: autotest with a direct path
Date: Wed, 14 May 2008 18:34:55 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Rikki Duncan on 5/14/2008 11:31 AM:
| I have an autotest script that has a direct path associated with it in
| order to locate my directory that contains the basefiles used for
| comparison.  My question is...how do I make this script run without
| containing a direct path so that a build on a server will work?  Here is
| my code and I am referring to line 5. Thanks!
|
|
| # Process with autom4te to create an -*- Autotest -*- test suite.
|
| m4_define([_getocapi], [getocapi])
| m4_define([base_url], [http://test.opendap.org:8080/dods/dts])
| m4_define([baseline_files_dir], [/home/rikki/workspace/Ocapi/Tests])

You are correct that absolute paths make the testsuite non-portable - for
that matter, even relative paths that point to a directory outside the
hierarchy specified in configure.ac can be problematic.  My suggestion
would be to use an environment variable.  Anything you put in aclocal.in
will be sourced before running the tests, so you could use that to prime
the variable to a sane default:

: address@hidden@}

Then, instead of using baseline_files_dir as an m4 variable, you could
write this as

| _AT_DAS_TEST([base_url/$1], [baseline_files_dir/das/$1.das])

_AT_DAS_TEST([base_url/$1], [$baseline_files_dir/das/$1.das])

Then calling './testsuite' will use the default AC_SUBST value learned
from configure, while calling './testsuite baseline_files_dir=/my/path'
will use the alternate path for your specific setup.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgrhS8ACgkQ84KuGfSFAYDsXQCdFNvJyU1BH7kwKTgOR8HsYme3
V74AnRUjBOOAUlDO8Q189K9ANmfdLLox
=q0RS
-----END PGP SIGNATURE-----




reply via email to

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