[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] Re: gnulib-tool --with-tests --test
From: |
Ralf Wildenhues |
Subject: |
Re: [bug-gnulib] Re: gnulib-tool --with-tests --test |
Date: |
Sun, 12 Nov 2006 10:57:33 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hello Bruno,
* Bruno Haible wrote on Fri, Nov 10, 2006 at 08:05:41PM CET:
> Ralf Wildenhues wrote:
> > The patch below should some of the reported issues. OK to apply?
>
> Thanks for this patch. Everything except the first hunk (gl_source_base)
> is fine. Please apply.
Thanks. I noted that my patch broke
gnulib-tool --test
so to fix that I wrapped running of the autotools in gltests/ in an
if test -n "$inctests"; then
#...
fi
and applied.
> About the gl_source_base of the tests directory: The idea is that
> the tests directory has its sources separate from the main directory,
> so that when a dependency (providing a .h file, for example) is missing
> from a library module but present in the tests module, we still an
> error while compiling the library. Otherwise testing with --with-tests
> might fail to uncover dependency bugs that --without-tests would uncover;
> this is obviously undesirable. - Can you find another fix for the problem?
FWIW, I don't understand this. The gltests/ subdirectory already shares
as much as possible with the parent configury: gltests/configure.ac has
| AC_CONFIG_AUX_DIR([../build-aux])
and gltests/Makefile.am has
| ACLOCAL_AMFLAGS = -I ../glm4
and the *only* location in the gltests/configure script where
$gl_source_base is needed is for finding the getloadavg.c file,
which quite obviously exists in ../gllib. I mean, all the $x-tests
modules depend upon the module $x anyway, so what are you trying to
catch here?
> > FWIW, I still don't understand the necessity of a separate configure
> > script in the gltests/ subdirectory at all. Is that just for testing
> > purposes?
>
> Like above: If the tests module requires an m4 macro invocation that the
> library module would also need but lacks, --with-tests would not uncover
> the bug.
I don't buy that either. The macro directory is shared, there is
nothing to win here. Note this is the func_create_tests I'm changing,
not the megatest part.
I still maintain that the patch below is needed. For reproducing the
issue, it is sufficient to run
$ gnulib-tool --with-tests --test getloadavg
[...]
| checking for error_at_line... yes
| configure: error: ./gltests/getloadavg.c is missing
| configure: error: ./configure failed for gltests
Cheers,
Ralf
* gnulib-tool (func_create_testdir): Fix gl_source_base setting.
Index: gnulib-tool
===================================================================
RCS file: /cvsroot/gnulib/gnulib/gnulib-tool,v
retrieving revision 1.189
diff -u -r1.189 gnulib-tool
--- gnulib-tool 12 Nov 2006 09:53:16 -0000 1.189
+++ gnulib-tool 12 Nov 2006 09:55:57 -0000
@@ -2284,7 +2284,7 @@
echo "gl_libdeps="
echo "gl_ltlibdeps="
fi
- echo "gl_source_base='$testsbase'"
+ echo "gl_source_base='../$sourcebase'"
# Wrap the set of autoconf snippets into an autoconf macro that is then
# invoked. This is needed because autoconf does not support AC_REQUIRE
# at the top level: