autoconf-patches
[Top][All Lists]
Advanced

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

Re: new autotest macro: AT_DATA_UNQUOTED


From: Akim Demaille
Subject: Re: new autotest macro: AT_DATA_UNQUOTED
Date: Fri, 17 Oct 2003 10:22:45 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

 > I want my testsuite to be relocatable too.  But if I generate
 > hardcoded `AC_CONFIG_AUX_DIR([../../config])', I need to remember to
 > edit that line (in every test!) if I move the tests. 

You can use a macro to address this issue, there is no need for sh.

 > Alternatively I could have a different AUX_DIR (and MACRO_DIR, and
 > maybe others) for each test group... but that seems like a lot of
 > duplicated files.

Right.  But using one external repository removes the standalone-ness
of the test suite :(

 > Why is it bad to want to do it this way?

It's just a feeling.  Plus, the original author resisted to such a
feature, and I blindly believe in his opinions.  But I'm not making
this a religious matter: if you _need_ this, let's change it.  I
resisted until now because in each case, there was another solution:

- adjusting the wrappers
- introducing macros

For instance your example above (having to change all the
../../config) is certainly not solved using $top_srcdir/config: if you
move config, you need to change plenty of "$top_srcdir/config", back
to the initial problem.  Using

m4_define([AT_CONFIG_AUX_DIR], [../../config])

m4_define([AT_DATA_CONFIGURE_AC]
[AT_DATA_UNQUOTED([configure.ac],
[[AC_INIT
AC_CONFIG_AUX_DIR(]AT_CONFIG_AUX_DIR[)   dnl use m4_defn to be rigorous
$1
AC_OUTPUT
]])

should do the trick.

 >> Maybe we should address a different need: some
 >> kind of store into which the test suite creates files which are used
 >> by most tests?

 > I'm not sure I follow.  In libtool, there is already
 > $top_srcdir/config, and $top_srcdir/m4 (which contains the shipped
 > libtool.m4), I've managed to eliminate the 14 copies of libtool.m4 we
 > used to ship thanks to m4_include in the latest Automake.  Can my
 > store be $top_srcdir/m4? ;-)

:)

I have in mind that "testsuite" itself should be a regular
application, which you can install, use with other tools (e.g., the
bison test suite could use byacc to exercise it) etc.  That's why I'm
looking for means to keep the test suite itself self contained.

But I agree it should not be mandatory.




reply via email to

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